@sorrell/utilities 1.1.60 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/Distribution/PackageExports.Generated.json +122 -0
  2. package/Distribution/Types/Array/Array.Internal.Types.d.cts +43 -0
  3. package/Distribution/Types/Array/Array.Internal.Types.d.cts.map +10 -0
  4. package/Distribution/Types/Array/Array.Internal.Types.d.mts +43 -0
  5. package/Distribution/Types/Array/Array.Internal.Types.d.mts.map +10 -0
  6. package/Distribution/Types/Array/Array.Internal.d.cts +16 -0
  7. package/Distribution/Types/Array/Array.Internal.d.cts.map +10 -0
  8. package/Distribution/Types/Array/Array.Internal.d.mts +16 -0
  9. package/Distribution/Types/Array/Array.Internal.d.mts.map +10 -0
  10. package/Distribution/Types/Array/Array.Types.d.cts +92 -0
  11. package/Distribution/Types/Array/Array.Types.d.cts.map +10 -0
  12. package/Distribution/Types/Array/Array.Types.d.mts +92 -0
  13. package/Distribution/Types/Array/Array.Types.d.mts.map +10 -0
  14. package/Distribution/Types/Array/Array.d.cts +33 -0
  15. package/Distribution/Types/Array/Array.d.cts.map +10 -0
  16. package/Distribution/Types/Array/Array.d.mts +33 -0
  17. package/Distribution/Types/Array/Array.d.mts.map +10 -0
  18. package/Distribution/Types/Array/index.d.cts +9 -0
  19. package/Distribution/Types/Array/index.d.cts.map +10 -0
  20. package/Distribution/Types/Array/index.d.mts +9 -0
  21. package/Distribution/Types/Array/index.d.mts.map +10 -0
  22. package/Distribution/Types/Async/Async.Types.d.cts +150 -0
  23. package/Distribution/Types/Async/Async.Types.d.cts.map +10 -0
  24. package/Distribution/Types/Async/Async.Types.d.mts +150 -0
  25. package/Distribution/Types/Async/Async.Types.d.mts.map +10 -0
  26. package/Distribution/Types/Async/Async.d.cts +145 -0
  27. package/Distribution/Types/Async/Async.d.cts.map +10 -0
  28. package/Distribution/Types/Async/Async.d.mts +145 -0
  29. package/Distribution/Types/Async/Async.d.mts.map +10 -0
  30. package/Distribution/Types/Async/index.d.cts +9 -0
  31. package/Distribution/Types/Async/index.d.cts.map +10 -0
  32. package/Distribution/Types/Async/index.d.mts +9 -0
  33. package/Distribution/Types/Async/index.d.mts.map +10 -0
  34. package/Distribution/Types/Effect/Effect.Types.d.cts +16 -0
  35. package/Distribution/Types/Effect/Effect.Types.d.cts.map +10 -0
  36. package/Distribution/Types/Effect/Effect.Types.d.mts +16 -0
  37. package/Distribution/Types/Effect/Effect.Types.d.mts.map +10 -0
  38. package/Distribution/Types/Effect/Effect.d.cts +8 -0
  39. package/Distribution/Types/Effect/Effect.d.cts.map +10 -0
  40. package/Distribution/Types/Effect/Effect.d.mts +8 -0
  41. package/Distribution/Types/Effect/Effect.d.mts.map +10 -0
  42. package/Distribution/Types/Effect/Index.Effect.d.cts +10 -0
  43. package/Distribution/Types/Effect/Index.Effect.d.cts.map +10 -0
  44. package/Distribution/Types/Effect/Index.Effect.d.mts +10 -0
  45. package/Distribution/Types/Effect/Index.Effect.d.mts.map +10 -0
  46. package/Distribution/Types/Effect/index.d.cts +8 -0
  47. package/Distribution/Types/Effect/index.d.cts.map +10 -0
  48. package/Distribution/Types/Effect/index.d.mts +8 -0
  49. package/Distribution/Types/Effect/index.d.mts.map +10 -0
  50. package/Distribution/Types/FileSystem/FileSystem.Types.d.cts +8 -0
  51. package/Distribution/Types/FileSystem/FileSystem.Types.d.cts.map +10 -0
  52. package/Distribution/Types/FileSystem/FileSystem.Types.d.mts +8 -0
  53. package/Distribution/Types/FileSystem/FileSystem.Types.d.mts.map +10 -0
  54. package/Distribution/Types/FileSystem/FileSystem.d.cts +55 -0
  55. package/Distribution/Types/FileSystem/FileSystem.d.cts.map +10 -0
  56. package/Distribution/Types/FileSystem/FileSystem.d.mts +55 -0
  57. package/Distribution/Types/FileSystem/FileSystem.d.mts.map +10 -0
  58. package/Distribution/Types/FileSystem/FileSystem.d.ts +20 -0
  59. package/Distribution/Types/FileSystem/FileSystem.d.ts.map +1 -1
  60. package/Distribution/Types/FileSystem/index.d.cts +9 -0
  61. package/Distribution/Types/FileSystem/index.d.cts.map +10 -0
  62. package/Distribution/Types/FileSystem/index.d.mts +9 -0
  63. package/Distribution/Types/FileSystem/index.d.mts.map +10 -0
  64. package/Distribution/Types/Functional/Functional.Internal.Types.d.cts +9 -0
  65. package/Distribution/Types/Functional/Functional.Internal.Types.d.cts.map +10 -0
  66. package/Distribution/Types/Functional/Functional.Internal.Types.d.mts +9 -0
  67. package/Distribution/Types/Functional/Functional.Internal.Types.d.mts.map +10 -0
  68. package/Distribution/Types/Functional/Functional.Internal.Types.d.ts +9 -0
  69. package/Distribution/Types/Functional/Functional.Internal.Types.d.ts.map +1 -0
  70. package/Distribution/Types/Functional/Functional.Internal.d.cts +8 -0
  71. package/Distribution/Types/Functional/Functional.Internal.d.cts.map +10 -0
  72. package/Distribution/Types/Functional/Functional.Internal.d.mts +8 -0
  73. package/Distribution/Types/Functional/Functional.Internal.d.mts.map +10 -0
  74. package/Distribution/Types/Functional/Functional.Internal.d.ts +8 -0
  75. package/Distribution/Types/Functional/Functional.Internal.d.ts.map +1 -0
  76. package/Distribution/Types/Functional/Functional.Types.d.cts +28 -0
  77. package/Distribution/Types/Functional/Functional.Types.d.cts.map +10 -0
  78. package/Distribution/Types/Functional/Functional.Types.d.mts +28 -0
  79. package/Distribution/Types/Functional/Functional.Types.d.mts.map +10 -0
  80. package/Distribution/Types/Functional/Functional.d.cts +8 -0
  81. package/Distribution/Types/Functional/Functional.d.cts.map +10 -0
  82. package/Distribution/Types/Functional/Functional.d.mts +8 -0
  83. package/Distribution/Types/Functional/Functional.d.mts.map +10 -0
  84. package/Distribution/Types/Functional/Functional.d.ts.map +1 -1
  85. package/Distribution/Types/Functional/index.d.cts +9 -0
  86. package/Distribution/Types/Functional/index.d.cts.map +10 -0
  87. package/Distribution/Types/Functional/index.d.mts +9 -0
  88. package/Distribution/Types/Functional/index.d.mts.map +10 -0
  89. package/Distribution/Types/Math/Complex.Internal.d.cts +8 -0
  90. package/Distribution/Types/Math/Complex.Internal.d.cts.map +10 -0
  91. package/Distribution/Types/Math/Complex.Internal.d.mts +8 -0
  92. package/Distribution/Types/Math/Complex.Internal.d.mts.map +10 -0
  93. package/Distribution/Types/Math/Complex.Types.d.cts +69 -0
  94. package/Distribution/Types/Math/Complex.Types.d.cts.map +10 -0
  95. package/Distribution/Types/Math/Complex.Types.d.mts +69 -0
  96. package/Distribution/Types/Math/Complex.Types.d.mts.map +10 -0
  97. package/Distribution/Types/Math/Complex.d.cts +63 -0
  98. package/Distribution/Types/Math/Complex.d.cts.map +10 -0
  99. package/Distribution/Types/Math/Complex.d.mts +63 -0
  100. package/Distribution/Types/Math/Complex.d.mts.map +10 -0
  101. package/Distribution/Types/Math/Index.Complex.d.cts +9 -0
  102. package/Distribution/Types/Math/Index.Complex.d.cts.map +10 -0
  103. package/Distribution/Types/Math/Index.Complex.d.mts +9 -0
  104. package/Distribution/Types/Math/Index.Complex.d.mts.map +10 -0
  105. package/Distribution/Types/Math/Index.Experimental.d.cts +10 -0
  106. package/Distribution/Types/Math/Index.Experimental.d.cts.map +10 -0
  107. package/Distribution/Types/Math/Index.Experimental.d.mts +10 -0
  108. package/Distribution/Types/Math/Index.Experimental.d.mts.map +10 -0
  109. package/Distribution/Types/Math/Math.Internal.Types.d.cts +41 -0
  110. package/Distribution/Types/Math/Math.Internal.Types.d.cts.map +10 -0
  111. package/Distribution/Types/Math/Math.Internal.Types.d.mts +41 -0
  112. package/Distribution/Types/Math/Math.Internal.Types.d.mts.map +10 -0
  113. package/Distribution/Types/Math/Math.Types.d.cts +90 -0
  114. package/Distribution/Types/Math/Math.Types.d.cts.map +10 -0
  115. package/Distribution/Types/Math/Math.Types.d.mts +90 -0
  116. package/Distribution/Types/Math/Math.Types.d.mts.map +10 -0
  117. package/Distribution/Types/Math/Math.d.cts +8 -0
  118. package/Distribution/Types/Math/Math.d.cts.map +10 -0
  119. package/Distribution/Types/Math/Math.d.mts +8 -0
  120. package/Distribution/Types/Math/Math.d.mts.map +10 -0
  121. package/Distribution/Types/Math/Vector.d.cts +102 -0
  122. package/Distribution/Types/Math/Vector.d.cts.map +10 -0
  123. package/Distribution/Types/Math/Vector.d.mts +102 -0
  124. package/Distribution/Types/Math/Vector.d.mts.map +10 -0
  125. package/Distribution/Types/Math/index.d.cts +15 -0
  126. package/Distribution/Types/Math/index.d.cts.map +10 -0
  127. package/Distribution/Types/Math/index.d.mts +15 -0
  128. package/Distribution/Types/Math/index.d.mts.map +10 -0
  129. package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts +8 -0
  130. package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts.map +10 -0
  131. package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts +8 -0
  132. package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts.map +10 -0
  133. package/Distribution/Types/Miscellaneous/Utility.Types.d.cts +100 -0
  134. package/Distribution/Types/Miscellaneous/Utility.Types.d.cts.map +10 -0
  135. package/Distribution/Types/Miscellaneous/Utility.Types.d.mts +100 -0
  136. package/Distribution/Types/Miscellaneous/Utility.Types.d.mts.map +10 -0
  137. package/Distribution/Types/Miscellaneous/index.d.cts +8 -0
  138. package/Distribution/Types/Miscellaneous/index.d.cts.map +10 -0
  139. package/Distribution/Types/Miscellaneous/index.d.mts +8 -0
  140. package/Distribution/Types/Miscellaneous/index.d.mts.map +10 -0
  141. package/Distribution/Types/Npm/Index.Effect.d.cts +9 -0
  142. package/Distribution/Types/Npm/Index.Effect.d.cts.map +10 -0
  143. package/Distribution/Types/Npm/Index.Effect.d.mts +9 -0
  144. package/Distribution/Types/Npm/Index.Effect.d.mts.map +10 -0
  145. package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts +17 -0
  146. package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts.map +10 -0
  147. package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts +17 -0
  148. package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts.map +10 -0
  149. package/Distribution/Types/Npm/Npm.Effect.Types.d.cts +12 -0
  150. package/Distribution/Types/Npm/Npm.Effect.Types.d.cts.map +10 -0
  151. package/Distribution/Types/Npm/Npm.Effect.Types.d.mts +12 -0
  152. package/Distribution/Types/Npm/Npm.Effect.Types.d.mts.map +10 -0
  153. package/Distribution/Types/Npm/Npm.Effect.d.cts +92 -0
  154. package/Distribution/Types/Npm/Npm.Effect.d.cts.map +10 -0
  155. package/Distribution/Types/Npm/Npm.Effect.d.mts +92 -0
  156. package/Distribution/Types/Npm/Npm.Effect.d.mts.map +10 -0
  157. package/Distribution/Types/Npm/Npm.Error.d.cts +36 -0
  158. package/Distribution/Types/Npm/Npm.Error.d.cts.map +10 -0
  159. package/Distribution/Types/Npm/Npm.Error.d.mts +36 -0
  160. package/Distribution/Types/Npm/Npm.Error.d.mts.map +10 -0
  161. package/Distribution/Types/Npm/Npm.d.cts +91 -0
  162. package/Distribution/Types/Npm/Npm.d.cts.map +10 -0
  163. package/Distribution/Types/Npm/Npm.d.mts +91 -0
  164. package/Distribution/Types/Npm/Npm.d.mts.map +10 -0
  165. package/Distribution/Types/Npm/index.d.cts +15 -0
  166. package/Distribution/Types/Npm/index.d.cts.map +10 -0
  167. package/Distribution/Types/Npm/index.d.mts +15 -0
  168. package/Distribution/Types/Npm/index.d.mts.map +10 -0
  169. package/Distribution/Types/Path/Path.d.cts +17 -0
  170. package/Distribution/Types/Path/Path.d.cts.map +10 -0
  171. package/Distribution/Types/Path/Path.d.mts +17 -0
  172. package/Distribution/Types/Path/Path.d.mts.map +10 -0
  173. package/Distribution/Types/Path/index.d.cts +8 -0
  174. package/Distribution/Types/Path/index.d.cts.map +10 -0
  175. package/Distribution/Types/Path/index.d.mts +8 -0
  176. package/Distribution/Types/Path/index.d.mts.map +10 -0
  177. package/Distribution/Types/String/String.d.cts +28 -0
  178. package/Distribution/Types/String/String.d.cts.map +10 -0
  179. package/Distribution/Types/String/String.d.mts +28 -0
  180. package/Distribution/Types/String/String.d.mts.map +10 -0
  181. package/Distribution/Types/String/index.d.cts +8 -0
  182. package/Distribution/Types/String/index.d.cts.map +10 -0
  183. package/Distribution/Types/String/index.d.mts +8 -0
  184. package/Distribution/Types/String/index.d.mts.map +10 -0
  185. package/Distribution/Types/index.d.cts +24 -0
  186. package/Distribution/Types/index.d.cts.map +10 -0
  187. package/Distribution/Types/index.d.mts +24 -0
  188. package/Distribution/Types/index.d.mts.map +10 -0
  189. package/Distribution/{CJS/array.js → array.cjs} +1 -1
  190. package/Distribution/{CJS/array.js.map → array.cjs.map} +1 -1
  191. package/Distribution/{ESM/array.js.map → array.js.map} +1 -1
  192. package/Distribution/{CJS/async.js → async.cjs} +1 -1
  193. package/Distribution/{CJS/async.js.map → async.cjs.map} +1 -1
  194. package/Distribution/{ESM/async.js.map → async.js.map} +1 -1
  195. package/Distribution/{CJS/complex.js → complex.cjs} +1 -1
  196. package/Distribution/{CJS/complex.js.map → complex.cjs.map} +1 -1
  197. package/Distribution/{ESM/complex.js.map → complex.js.map} +1 -1
  198. package/Distribution/{CJS/effect.js → effect.cjs} +1 -1
  199. package/Distribution/{CJS/effect.js.map → effect.cjs.map} +1 -1
  200. package/Distribution/{ESM/effect.js.map → effect.js.map} +1 -1
  201. package/Distribution/{CJS/fs.js → fs.cjs} +10 -6
  202. package/Distribution/fs.cjs.map +7 -0
  203. package/Distribution/{ESM/fs.js → fs.js} +9 -5
  204. package/Distribution/fs.js.map +7 -0
  205. package/Distribution/{CJS/functional.js → functional.cjs} +1 -1
  206. package/Distribution/functional.cjs.map +7 -0
  207. package/Distribution/functional.js.map +7 -0
  208. package/Distribution/{CJS/index.js → index.cjs} +15 -11
  209. package/Distribution/index.cjs.map +7 -0
  210. package/Distribution/{ESM/index.js → index.js} +14 -10
  211. package/Distribution/index.js.map +7 -0
  212. package/Distribution/{CJS/math.js → math.cjs} +1 -1
  213. package/Distribution/{CJS/math.js.map → math.cjs.map} +1 -1
  214. package/Distribution/{ESM/math.js.map → math.js.map} +1 -1
  215. package/Distribution/{CJS/misc.js → misc.cjs} +1 -1
  216. package/Distribution/{CJS/misc.js.map → misc.cjs.map} +1 -1
  217. package/Distribution/{ESM/misc.js.map → misc.js.map} +1 -1
  218. package/Distribution/{CJS/npm-effect.js → npm-effect.cjs} +1 -1
  219. package/Distribution/{CJS/npm-effect.js.map → npm-effect.cjs.map} +1 -1
  220. package/Distribution/{ESM/npm-effect.js.map → npm-effect.js.map} +1 -1
  221. package/Distribution/{CJS/npm.js → npm.cjs} +2 -2
  222. package/Distribution/npm.cjs.map +7 -0
  223. package/Distribution/{ESM/npm.js → npm.js} +1 -1
  224. package/Distribution/npm.js.map +7 -0
  225. package/Distribution/{CJS/path.js → path.cjs} +1 -1
  226. package/Distribution/{CJS/path.js.map → path.cjs.map} +1 -1
  227. package/Distribution/{ESM/path.js.map → path.js.map} +1 -1
  228. package/License.md +21 -0
  229. package/ReadMe.md +2 -2
  230. package/package.json +100 -54
  231. package/Distribution/CJS/fs.js.map +0 -7
  232. package/Distribution/CJS/functional.js.map +0 -7
  233. package/Distribution/CJS/index.js.map +0 -7
  234. package/Distribution/CJS/npm.js.map +0 -7
  235. package/Distribution/ESM/fs.js.map +0 -7
  236. package/Distribution/ESM/functional.js.map +0 -7
  237. package/Distribution/ESM/index.js.map +0 -7
  238. package/Distribution/ESM/npm.js.map +0 -7
  239. /package/Distribution/{ESM/array.js → array.js} +0 -0
  240. /package/Distribution/{ESM/async.js → async.js} +0 -0
  241. /package/Distribution/{ESM/complex.js → complex.js} +0 -0
  242. /package/Distribution/{ESM/effect.js → effect.js} +0 -0
  243. /package/Distribution/{ESM/functional.js → functional.js} +0 -0
  244. /package/Distribution/{ESM/math.js → math.js} +0 -0
  245. /package/Distribution/{ESM/misc.js → misc.js} +0 -0
  246. /package/Distribution/{ESM/npm-effect.js → npm-effect.js} +0 -0
  247. /package/Distribution/{ESM/path.js → path.js} +0 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/String/index.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,cAAc,aAAa,CAAC"
10
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @file index.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ export * from "./String.mjs";
8
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../../Source/String/index.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH,cAAc,aAAa,CAAC"
10
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @file index.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ /**
8
+ * @module
9
+ * General-purpose utility types and functions.
10
+ * This module barrel-exports each scoped export of this package.
11
+ * Use the scoped exports of this package to access only specific
12
+ * utilities (*e.g.*, `async`, `npm`, *etc.*).
13
+ */
14
+ export * as Array from "./Array/index.cjs";
15
+ export * as Async from "./Async/index.cjs";
16
+ export * as Complex from "./Math/Complex.cjs";
17
+ export * as FileSystem from "./FileSystem/index.cjs";
18
+ export * as Functional from "./Functional/index.cjs";
19
+ export * as Math from "./Math/index.cjs";
20
+ export * as Miscellaneous from "./Miscellaneous/index.cjs";
21
+ export * as Npm from "./Npm/index.cjs";
22
+ export * as Path from "./Path/index.cjs";
23
+ export * as String from "./String/index.cjs";
24
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.cts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../Source/index.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"
10
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @file index.ts
3
+ * @author Gage Sorrell <gage@sorrell.sh>
4
+ * @copyright (c) 2026 Gage Sorrell
5
+ * @license MIT
6
+ */
7
+ /**
8
+ * @module
9
+ * General-purpose utility types and functions.
10
+ * This module barrel-exports each scoped export of this package.
11
+ * Use the scoped exports of this package to access only specific
12
+ * utilities (*e.g.*, `async`, `npm`, *etc.*).
13
+ */
14
+ export * as Array from "./Array/index.mjs";
15
+ export * as Async from "./Async/index.mjs";
16
+ export * as Complex from "./Math/Complex.mjs";
17
+ export * as FileSystem from "./FileSystem/index.mjs";
18
+ export * as Functional from "./Functional/index.mjs";
19
+ export * as Math from "./Math/index.mjs";
20
+ export * as Miscellaneous from "./Miscellaneous/index.mjs";
21
+ export * as Npm from "./Npm/index.mjs";
22
+ export * as Path from "./Path/index.mjs";
23
+ export * as String from "./String/index.mjs";
24
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "file": "index.d.mts",
4
+ "sourceRoot": "",
5
+ "sources": [
6
+ "../../Source/index.ts"
7
+ ],
8
+ "names": [],
9
+ "mappings": "AAAA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"
10
+ }
@@ -48,4 +48,4 @@ function FilterDefined(Array) {
48
48
  * @copyright (c) 2026 Gage Sorrell
49
49
  * @license MIT
50
50
  */
51
- //# sourceMappingURL=array.js.map
51
+ //# sourceMappingURL=array.cjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Array/index.ts", "../../Source/Array/Array.ts"],
3
+ "sources": ["../Source/Array/index.ts", "../Source/Array/Array.ts"],
4
4
  "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Array.ts\";\nexport * from \"./Array.Types.ts\";\n", "/**\n * @file Array.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { FilteredArray, Options, TArrayType } from \"./Array.Types.ts\";\nimport type { NoOptions } from \"../Miscellaneous/Utility.Types.ts\";\n/**\n * Filter out all instances of `undefined` from a given {@link Array:param}.\n * @param Array - The array to filter.\n *\n * @template ElementType - The type of the elements in the array.\n *\n * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}\n * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given\n * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.\n *\n * @example With the given {@link ElementType} including `undefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n * @example With the given {@link OptionsType} including `Options.MaybeDefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n */\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType> {\n return Array.filter((Element: ElementType | undefined): boolean => {\n return Element !== undefined;\n }) as FilteredArray<ElementType>;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgCO,SAAS,cAAuG,OAAuH;AAC1O,SAAO,MAAM,OAAO,CAAC,YAA8C;AAC/D,WAAO,YAAY;AAAA,EACvB,CAAC;AACL;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Array/Array.ts"],
3
+ "sources": ["../Source/Array/Array.ts"],
4
4
  "sourcesContent": ["/**\n * @file Array.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type { FilteredArray, Options, TArrayType } from \"./Array.Types.ts\";\nimport type { NoOptions } from \"../Miscellaneous/Utility.Types.ts\";\n/**\n * Filter out all instances of `undefined` from a given {@link Array:param}.\n * @param Array - The array to filter.\n *\n * @template ElementType - The type of the elements in the array.\n *\n * @returns {TArrayType<Exclude<ElementType, undefined>, Exclude<OptionsType, Options.MaybeDefined>>}\n * A new `Array` of type `Exclude<ElementType, undefined>` and `OptionsType` that is the given\n * {@link OptionsType}, with the {@link Options.MaybeDefined} option removed.\n *\n * @example With the given {@link ElementType} including `undefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number | undefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n * @example With the given {@link OptionsType} including `Options.MaybeDefined`.\n * ```typescript\n * const MaybeOddNumbers: TArray<number, Options.MaybeDefined> = [ 1, 3, undefined, 5 ];\n * const OddNumbers: TArray<number> = FilterDefined(MaybeOddNumbers);\n * ```\n */\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType>;\nexport function FilterDefined<ElementType, OptionsType extends Options = NoOptions, ArraySize extends number = number>(Array: TArrayType<ElementType | undefined, OptionsType | Options.MaybeDefined, ArraySize>): FilteredArray<ElementType> {\n return Array.filter((Element: ElementType | undefined): boolean => {\n return Element !== undefined;\n }) as FilteredArray<ElementType>;\n}\n"],
5
5
  "mappings": ";AAgCO,SAAS,cAAuG,OAAuH;AAC1O,SAAO,MAAM,OAAO,CAAC,YAA8C;AAC/D,WAAO,YAAY;AAAA,EACvB,CAAC;AACL;",
6
6
  "names": []
@@ -171,4 +171,4 @@ var TPromise = class _TPromise extends TPromiseLike {
171
171
  * @copyright (c) 2026 Gage Sorrell
172
172
  * @license MIT
173
173
  */
174
- //# sourceMappingURL=async.js.map
174
+ //# sourceMappingURL=async.cjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Async/index.ts", "../../Source/Miscellaneous/Utility.Types.ts", "../../Source/Async/Async.ts"],
3
+ "sources": ["../Source/Async/index.ts", "../Source/Miscellaneous/Utility.Types.ts", "../Source/Async/Async.ts"],
4
4
  "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Async.ts\";\nexport * from \"./Async.Types.ts\";\n", "/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC0EO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;ACpCA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAM,OAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH;AAAA,MACA,OAAO;AAAA,IACX;AAAA,EACJ,SACO,YAAqB;AACxB,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAqBA,eAAsB,IAA4C,UAAsC,QAA2G;AAC/M,QAAM,gBAAgB,OAAO,YAA6D;AACtF,WAAO,OAAO,OAAO;AAAA,EACzB;AACA,QAAM,MAAyC,SAAS,IAAI,aAAa;AACzE,SAAO,MAAM,QAAQ,IAAI,GAAG;AAChC;AAKO,IAAe,eAAf,MAA6E;AAAA,EACzE,KAAmD,cAAsD,aAA8E;AAC1L,UAAM,IAAI,wBAAwB,cAAc;AAAA,EACpD;AACJ;AAWO,IAAM,6BAAN,cAAyC,UAAU;AAAA,EAC/C,cAAc;AACjB,UAAM;AAAA,EACV;AACJ;AAMO,IAAM,WAAN,MAAM,kBAA8B,aAA8D;AAAA,EAC9F,YAAY,UAA6C;AAC5D,UAAM;AACN,QAAI,OAAO,aAAa,YAAY;AAChC,WAAK,aAAa,IAAI,QAAqB,QAAQ;AAAA,IACvD,OACK;AACD,UAAI,oBAAoB,WAAU;AAC9B,aAAK,aAAa,SAAS,IAAI;AAAA,MACnC,WACS,oBAAoB,SAAS;AAClC,aAAK,aAAa;AAAA,MACtB;AAAA,IACJ;AACA,UAAM,IAAI,2BAA2B;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8CO,KAAmD,aAAoD,YAAyE;AACnL,WAAO,IAAI,UAAkC,KAAK,WAAW,KAAK,aAAa,UAAU,CAAC;AAAA,EAC9F;AAAA,EACgB,KAAmD,aAAqD,YAAyE;AAC7L,WAAO,IAAI,UAAkC,KAAK,WAAW,KAAK,aAAa,UAAU,CAAC;AAAA,EAC9F;AAAA,EACO,MAA0B,YAA0F;AACvH,WAAO,IAAI,UAAmC,KAAK,WAAW,MAAM,UAAU,CAAC;AAAA,EACnF;AAAA,EACO,QAAQ,WAAyD;AACpE,WAAO,IAAI,UAAS,KAAK,WAAW,QAAQ,SAAS,CAAC;AAAA,EAC1D;AAAA,EACA,OAAc,QAAqB,OAA+E;AAC9G,WAAO,IAAI,UAAS,QAAQ,QAAQ,KAAK,CAAC;AAAA,EAC9C;AAAA,EACA,OAAc,OAA8B,QAAyC;AACjF,WAAO,IAAI,UAAS,QAAQ,OAAoB,MAAM,CAAC;AAAA,EAC3D;AAAA,EACO,MAA4B;AAC/B,WAAO,KAAK;AAAA,EAChB;AACJ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Miscellaneous/Utility.Types.ts", "../../Source/Async/Async.ts"],
3
+ "sources": ["../Source/Miscellaneous/Utility.Types.ts", "../Source/Async/Async.ts"],
4
4
  "sourcesContent": ["/**\n * @file Utility.Types.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport type * as TypeScript from \"typescript\";\nimport type { NoOptions } from \"./Utility.Internal.ts\";\n/**\n * @deprecated Use {@link TMutable} instead.\n *\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n */\nexport type TDeepWriteable<RecordLike> = {\n -readonly [Key in keyof RecordLike]: TDeepWriteable<RecordLike[Key]>;\n};\n/**\n * Defines a type that corresponds to {@link RecordLike}, such that every\n * `readonly` modifier is removed, recursively.\n *\n * @template RecordLike - The type to make writeable.\n * @template ShallowOption - Whether the `readonly` modifier should be stripped recursively.\n * If `true` (the default), then only the properties of the given type will have the `readonly`\n * modifier stripped (that is, if any of these properties is a {@link Record} type with `readonly`\n * modifiers, then those will *not* be removed if {@link ShallowOption} is `true`).\n */\nexport type TMutable<RecordLike, ShallowOption extends boolean = true> = ShallowOption extends false ? {\n -readonly [Key in keyof RecordLike]: RecordLike[Key];\n} : ShallowOption extends true ? {\n -readonly [Key in keyof RecordLike]: TMutable<RecordLike[Key]>;\n} : never;\n/**\n * Given a {@link RecordLike | record-like type}, this type is the union\n * of the values of all properties in the {@link RecordLike | record-like type}.\n *\n * @template RecordLike - The record-like type from which this type extracts value types.\n */\nexport type TValues<RecordLike> = RecordLike[keyof RecordLike];\n/**\n * The union of a given {@link ElementType} and the array of a given {@link ElementType}.\n *\n * @template ElementType - The type of this, or the type of elements contained by this.\n */\nexport type TMaybeArray<ElementType> = ElementType | Array<ElementType>;\n/**\n * The element type of the return value of `Object.entries()`.\n *\n * @template RecordLike - The record-like type of the argument of `Object.entries()`.\n * @template KeyType - The subset of keys used by this type.\n */\nexport type TEntry<RecordLike, KeyType extends keyof RecordLike = keyof RecordLike> = [\n KeyType,\n RecordLike[KeyType]\n];\n/** The type used in `OptionsType`s when no options are specified. */\nexport type NoOptions = typeof NoOptions;\n/**\n * Define options for a given type as a union of `unique symbol` types.\n * All options must be *optional* by the type that uses these options.\n * The type that uses these options should have a type parameter `OptionsType`\n * defined with `OptionsType extends TOptions = NoOptions`. You will have to import\n * {@link NoOptions}, but this should be done anyway, since making all options types\n * optional should be optional. For this reason {@link NoOptions} is exported from the\n * same module as this type.\n *\n * @template OptionsType - The `unique symbol` types that act as options.\n *\n * @example * See the {@link Array.Options:type} type as an example.\n */\nexport type TOptions<OptionsType extends symbol = NoOptions> = OptionsType | NoOptions;\nexport type TNullable<Type> = Type | null | undefined;\nexport class AbstractMethodCallError extends Error {\n public constructor(ClassName?: string) {\n super(ClassName);\n }\n}\n/** The type corresponding to the schema of `tsconfig.json`. */\nexport interface FTsConfig {\n extends?: string | Array<string>;\n files?: Array<string>;\n include?: Array<string>;\n exclude?: Array<string>;\n references?: Array<TypeScript.ProjectReference>;\n compilerOptions?: FCompilerOptions;\n watchOptions?: TypeScript.WatchOptions;\n typeAcquisition?: TypeScript.TypeAcquisition;\n compileOnSave?: boolean;\n}\ntype FOverriddenCompilerOptions = \"jsx\" | \"lib\" | \"module\" | \"moduleResolution\" | \"target\";\ntype FCompilerOptions = Omit<TypeScript.server.protocol.CompilerOptions, FOverriddenCompilerOptions> & Partial<{\n jsx: JsxEmit;\n lib: Array<string>;\n module: FModuleKind;\n moduleResolution: FModuleResolutionKind;\n target: FTarget;\n}>;\ntype JsxEmit = \"none\" | \"preserve\" | \"react-native\" | \"react\" | \"react-jsx\" | \"react-jsxdev\";\ntype FModuleKind = \"none\" | \"commonjs\" | \"amd\" | \"umd\" | \"system\" | \"es6\" | \"es2015\" | \"es2020\" | \"es2022\" | \"esnext\" | \"node16\" | \"node18\" | \"node20\" | \"nodenext\" | \"preserve\";\ntype FModuleResolutionKind = \"classic\" | \"node\" | \"node\" | \"node10\" | \"node16\" | \"nodenext\" | \"bundler\";\nexport type FTarget = \"es3\" | \"es5\" | \"es6\" | \"es2015\" | \"es2016\" | \"es2017\" | \"es2018\" | \"es2019\" | \"es2020\" | \"es2021\" | \"es2022\" | \"es2023\" | \"es2024\" | \"es2025\" | \"esnext\" | \"json\" | \"esnext\" | \"es2025\";\n", "/**\n * @file Async.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { AbstractMethodCallError, type TNullable } from \"../Miscellaneous/Utility.Types.ts\";\nimport type { TOnFulfilled, TOnRejected, TPromiseCtorArgument, TTryResult, TTrySource } from \"./Async.Types.ts\";\nimport type { TFunction } from \"../Functional/Functional.Types.ts\";\n/**\n * Implements \"Errors-as-values\" for `async` functions and `Promise<DataType>`s.\n *\n * If the `async` function or `Promise<DataType>` returns/resolves, then the `Error`\n * property of the returned object will be `undefined`, and the result of the\n * `async` function or `Promise<DataType>` will reside in the `Data` property of the\n * returned object.\n *\n * Similarly, if the `async` function or `Promise<DataType>` throws, then the `Data`\n * property of the returned object is `undefined`, and the `Error` property is what\n * was thrown to the `catch` block.\n *\n * @template DataType - The type of the data that the `async` function or `Promise<DataType>`.\n * @param Source - The `async` function or `Promise` to evaluate.\n *\n * @returns {TTryResult<DataType>} A {@link TTryResult} containing either the result\n * ({@link TTryResult.Data}) or error {@link TTryResult.Error}.\n *\n * @example\n * // With an `async` function,\n * async function GetName(): Promise<string> { ... }\n * // Or, with a `Promise`,\n * const GetName: Promise<string> = new Promise<string>(...);\n *\n * // For both of the above cases, `Try` behaves the same:\n * const { Data: Name, Error: NameError } = await Try(GetName);\n * // If `GetName` returned,\n * // `typeof Name` <- `\"string\"`\n * // `typeof NameError` <- `\"undefined\"`\n * // If `GetName` threw,\n * // `typeof Name` <- `\"undefined\"`\n * // `NameError !== undefined` <- `true` (Unless `GetName` threw `undefined`).\n */\nexport async function Try<DataType>(Source: TTrySource<DataType>): Promise<TTryResult<DataType>> {\n try {\n const Data: DataType = typeof Source === \"function\"\n ? await Source()\n : await Source;\n return {\n Data,\n Error: undefined\n };\n }\n catch (ErrorValue: unknown) {\n return {\n Data: undefined,\n Error: ErrorValue\n };\n }\n}\n/**\n * A cleaner way of using `Array.prototype.map` with an `async` function.\n *\n * @template ArgumentElementType - The type of the given {@link Elements}.\n * @template ReturnElementType - The type of the `Array` returned by this.\n *\n * @param Elements - The `Array` that will be transformed.\n * @param Mapper - The function that maps each {@link ArgumentElementType}\n * to a {@link ReturnElementType}.\n *\n * @returns {Array<ReturnElementType>} An `Array` of {@link ReturnElementType}.\n *\n * @example\n * In an `async` function,\n * ```typescript\n * const ArgumentElements: Array<ArgumentElementType> = [ ... ];\n * const ToReturnElement = async (Element: ArgumentElementType): Promise<ReturnElementType> => ...;\n * const ReturnElements: Array<ReturnElementType> = await Map(ArgumentElements, ToReturnElement);\n * ```\n */\nexport async function Map<ArgumentElementType, ReturnElementType>(Elements: Array<ArgumentElementType>, Mapper: ((Element: ArgumentElementType) => Promise<ReturnElementType>)): Promise<Array<ReturnElementType>> {\n const MapperWrapped = async (Element: ArgumentElementType): Promise<ReturnElementType> => {\n return Mapper(Element);\n };\n const Out: Array<Promise<ReturnElementType>> = Elements.map(MapperWrapped);\n return await Promise.all(Out);\n}\n/**\n * An abstract implementation of {@link PromiseLike}. This exists only to maintain the\n * project's naming convention.\n */\nexport abstract class TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public then<ResultType = ResolveType, RejectType = never>(_OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, _OnRejected?: TOnRejected<RejectType>): TPromiseLike<ResultType | RejectType> {\n throw new AbstractMethodCallError(\"TPromiseLike\");\n }\n}\n/**\n * The {@link TypeError} that is thrown by the constructor of {@link TPromise}\n * iff it receives an argument that is not a {@link TPromiseCtorArgument}.\n * It does not provide any additional information (in particular, it does not\n * add any properties, and it does not set any properties inherited from\n * {@link TypeError}).\n *\n * @note While the argument type of {@link TPromise}'s constructor is checked at runtime,\n * the type checker should prevent the error described by this from happening.\n */\nexport class FPromiseInstantiationError extends TypeError {\n public constructor() {\n super();\n }\n}\n/**\n * A `then`-able wrapper of {@link Promise}.\n *\n * @template ResolveType - The type to which this resolves, if it does resolve.\n */\nexport class TPromise<ResolveType> extends TPromiseLike<ResolveType> implements PromiseLike<ResolveType> {\n public constructor(Argument: TPromiseCtorArgument<ResolveType>) {\n super();\n if (typeof Argument === \"function\") {\n this.Underlying = new Promise<ResolveType>(Argument);\n }\n else {\n if (Argument instanceof TPromise) {\n this.Underlying = Argument.Raw();\n }\n else if (Argument instanceof Promise) {\n this.Underlying = Argument;\n }\n }\n throw new FPromiseInstantiationError();\n }\n private readonly Underlying: Promise<ResolveType>;\n /**\n * This class's extension of {@link Promise!then}.\n *\n * @template ResultType - The type to which the value underlying the {@link TPromise} returned by this\n * will resolve, if the {@link TPromise} resolves.\n *\n * @template RejectType - The type to which the value underlying the {@link TPromise} returned by this\n * will reject, if the {@link TPromise} rejects.\n *\n * @param OnFulfilled - The callback that is called when the underlying {@link Promise} resolves,\n * if it resolves.\n *\n * @param OnRejected - The callback that is called when the underlying {@link Promise} rejects,\n * if it rejects.\n *\n * @returns {TPromise<ResultType | RejectType>} A new {@link TPromise} of the result of the\n * given callbacks.\n *\n * @example\n * ```typescript\n * const Example: TPromise<string> = new TPromise<string>((Resolve, Reject) =>\n * {\n * if (Math.random() < 0.5)\n * {\n * Resolve(\"Success\");\n * }\n * else\n * {\n * Reject(\"Error\");\n * }\n * });\n *\n * Example.then(\n * (Value: string): void =>\n * {\n * // `Value` <- `\"Success\"`\n * },\n * (Reason: unknown): void =>\n * {\n * // `Reason` <- `\"Error\"`\n * }\n * );\n * ```\n */\n public Then<ResultType = ResolveType, RejectType = never>(OnFulfilled: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public override then<ResultType = ResolveType, RejectType = never>(OnFulfilled?: TOnFulfilled<ResolveType, ResultType>, OnRejected?: TOnRejected<RejectType>): TPromise<ResultType | RejectType> {\n return new TPromise<ResultType | RejectType>(this.Underlying.then(OnFulfilled, OnRejected));\n }\n public Catch<ResultType = never>(OnRejected?: TNullable<TOnRejected<ResolveType>>): TPromiseLike<ResolveType | ResultType> {\n return new TPromise<ResolveType | ResultType>(this.Underlying.catch(OnRejected));\n }\n public Finally(OnFinally?: TNullable<TFunction>): TPromise<ResolveType> {\n return new TPromise(this.Underlying.finally(OnFinally));\n }\n public static Resolve<ResolveType>(Value: ResolveType | PromiseLike<ResolveType>): TPromise<Awaited<ResolveType>> {\n return new TPromise(Promise.resolve(Value));\n }\n public static Reject<ResolveType = unknown>(Reason?: unknown): TPromise<ResolveType> {\n return new TPromise(Promise.reject<ResolveType>(Reason));\n }\n public Raw(): Promise<ResolveType> {\n return this.Underlying;\n }\n}\n;\n"],
5
5
  "mappings": ";AA0EO,IAAM,0BAAN,cAAsC,MAAM;AAAA,EACxC,YAAY,WAAoB;AACnC,UAAM,SAAS;AAAA,EACnB;AACJ;;;ACpCA,eAAsB,IAAc,QAA6D;AAC7F,MAAI;AACA,UAAM,OAAiB,OAAO,WAAW,aACnC,MAAM,OAAO,IACb,MAAM;AACZ,WAAO;AAAA,MACH;AAAA,MACA,OAAO;AAAA,IACX;AAAA,EACJ,SACO,YAAqB;AACxB,WAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,EACJ;AACJ;AAqBA,eAAsB,IAA4C,UAAsC,QAA2G;AAC/M,QAAM,gBAAgB,OAAO,YAA6D;AACtF,WAAO,OAAO,OAAO;AAAA,EACzB;AACA,QAAM,MAAyC,SAAS,IAAI,aAAa;AACzE,SAAO,MAAM,QAAQ,IAAI,GAAG;AAChC;AAKO,IAAe,eAAf,MAA6E;AAAA,EACzE,KAAmD,cAAsD,aAA8E;AAC1L,UAAM,IAAI,wBAAwB,cAAc;AAAA,EACpD;AACJ;AAWO,IAAM,6BAAN,cAAyC,UAAU;AAAA,EAC/C,cAAc;AACjB,UAAM;AAAA,EACV;AACJ;AAMO,IAAM,WAAN,MAAM,kBAA8B,aAA8D;AAAA,EAC9F,YAAY,UAA6C;AAC5D,UAAM;AACN,QAAI,OAAO,aAAa,YAAY;AAChC,WAAK,aAAa,IAAI,QAAqB,QAAQ;AAAA,IACvD,OACK;AACD,UAAI,oBAAoB,WAAU;AAC9B,aAAK,aAAa,SAAS,IAAI;AAAA,MACnC,WACS,oBAAoB,SAAS;AAClC,aAAK,aAAa;AAAA,MACtB;AAAA,IACJ;AACA,UAAM,IAAI,2BAA2B;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8CO,KAAmD,aAAoD,YAAyE;AACnL,WAAO,IAAI,UAAkC,KAAK,WAAW,KAAK,aAAa,UAAU,CAAC;AAAA,EAC9F;AAAA,EACgB,KAAmD,aAAqD,YAAyE;AAC7L,WAAO,IAAI,UAAkC,KAAK,WAAW,KAAK,aAAa,UAAU,CAAC;AAAA,EAC9F;AAAA,EACO,MAA0B,YAA0F;AACvH,WAAO,IAAI,UAAmC,KAAK,WAAW,MAAM,UAAU,CAAC;AAAA,EACnF;AAAA,EACO,QAAQ,WAAyD;AACpE,WAAO,IAAI,UAAS,KAAK,WAAW,QAAQ,SAAS,CAAC;AAAA,EAC1D;AAAA,EACA,OAAc,QAAqB,OAA+E;AAC9G,WAAO,IAAI,UAAS,QAAQ,QAAQ,KAAK,CAAC;AAAA,EAC9C;AAAA,EACA,OAAc,OAA8B,QAAyC;AACjF,WAAO,IAAI,UAAS,QAAQ,OAAoB,MAAM,CAAC;AAAA,EAC3D;AAAA,EACO,MAA4B;AAC/B,WAAO,KAAK;AAAA,EAChB;AACJ;",
6
6
  "names": []
@@ -94,4 +94,4 @@ var i = new FComplex(0, 1);
94
94
  * @copyright (c) 2026 Gage Sorrell
95
95
  * @license MIT
96
96
  */
97
- //# sourceMappingURL=complex.js.map
97
+ //# sourceMappingURL=complex.cjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Math/Complex.ts", "../../Source/Math/Complex.Internal.ts"],
3
+ "sources": ["../Source/Math/Complex.ts", "../Source/Math/Complex.Internal.ts"],
4
4
  "sourcesContent": ["/**\n * @file Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { MathBuiltin } from \"./Complex.Internal\";\nimport { Operator } from \"tsover-runtime\";\n/**\n * Elements of the complex plane, $\\mathbf{C} = \\mathbf{R}[x] / [ x^2 + 1 ]$.\n */\nexport class FComplex {\n public readonly Re: number;\n public readonly Im: number;\n public static Zero: FComplex = new FComplex(0, 0);\n /**\n * The copy constructor for {@link FComplex} numbers.\n *\n * @param Z - The existing {@link FComplex} number to copy.\n *\n * @example\n * ```typescript\n * const Z: FComplex = 3 + 2 * i;\n * const W: FComplex = new FComplex(Z);\n * // `W.Re === Z.Re` <- `true`\n * // `W.Im === Z.Im` <- `true`\n * ```\n */\n public constructor(Z: FComplex);\n /**\n * Construct an {@link FComplex} number by specifying the real\n * and imaginary components.\n *\n * @param A - The real component of the {@link FComplex} number.\n * @param B - The imaginary component of the {@link FComplex} number.\n *\n * @example\n * ```typescript\n * const Theta: number = 0.5;\n * const OnUnitDisk: FComplex = new FComplex(Math.sin(Theta), Math.cos(Theta));\n * ```\n */\n public constructor(A: number, B: number);\n public constructor(A: FComplex | number, B: number = 0) {\n if (typeof A === \"number\") {\n this.Re = A;\n this.Im = B;\n }\n else {\n this.Re = A.Re;\n this.Im = A.Im;\n }\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Mod(): number {\n return MathBuiltin.sqrt((this.Re ** 2) + (this.Im ** 2));\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Theta(): number {\n const Out: number = MathBuiltin.atan2(this.Im, this.Re);\n if (Out < 0) {\n return Out + 2 * MathBuiltin.PI;\n }\n return Out;\n }\n [Operator.star](A: FComplex, B: FComplex): FComplex;\n [Operator.star](A: FComplex, B: number): FComplex;\n [Operator.star](A: number, B: FComplex): FComplex;\n [Operator.star](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex((B as FComplex).Re * A, (B as FComplex).Im * A);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re * B, (A as FComplex).Im * B);\n }\n else {\n return new FComplex((((A as FComplex).Re + (B as FComplex).Re) -\n ((A as FComplex).Im + (B as FComplex).Im)), (((A as FComplex).Re + (B as FComplex).Im) +\n ((B as FComplex).Re + (A as FComplex).Im)));\n }\n }\n [Operator.plus](A: FComplex, B: FComplex): FComplex;\n [Operator.plus](A: FComplex, B: number): FComplex;\n [Operator.plus](A: number, B: FComplex): FComplex;\n [Operator.plus](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex(A + (B as FComplex).Re, (B as FComplex).Im);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re + B, (A as FComplex).Im);\n }\n else {\n return new FComplex((A as FComplex).Re + (B as FComplex).Re, (A as FComplex).Im + (B as FComplex).Im);\n }\n }\n}\nexport /**\n * The imaginary unit.\n */ const i: FComplex = new FComplex(0, 1);\n", "/**\n * @file Complex.Internal.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const MathBuiltin: typeof Math = Math;\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,cAA2B;;;ADCxC,4BAAyB;AAIlB,IAAM,YAAN,MAAM,UAAS;AAAA,EAgCX,YAAY,GAAsB,IAAY,GAAG;AACpD,QAAI,OAAO,MAAM,UAAU;AACvB,WAAK,KAAK;AACV,WAAK,KAAK;AAAA,IACd,OACK;AACD,WAAK,KAAK,EAAE;AACZ,WAAK,KAAK,EAAE;AAAA,IAChB;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,MAAc;AACrB,WAAO,YAAY,KAAM,KAAK,MAAM,IAAM,KAAK,MAAM,CAAE;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,QAAgB;AACvB,UAAM,MAAc,YAAY,MAAM,KAAK,IAAI,KAAK,EAAE;AACtD,QAAI,MAAM,GAAG;AACT,aAAO,MAAM,IAAI,YAAY;AAAA,IACjC;AACA,WAAO;AAAA,EACX;AAAA,EAIA,CAAC,+BAAS,IAAI,EAAE,GAAsB,GAAgC;AAClE,QAAI,OAAO,MAAM,UAAU;AACvB,aAAO,IAAI,UAAU,EAAe,KAAK,GAAI,EAAe,KAAK,CAAC;AAAA,IACtE,WACS,OAAO,MAAM,UAAU;AAC5B,aAAO,IAAI,UAAU,EAAe,KAAK,GAAI,EAAe,KAAK,CAAC;AAAA,IACtE,OACK;AACD,aAAO,IAAI,UAAY,EAAe,KAAM,EAAe,MACrD,EAAe,KAAM,EAAe,KAAS,EAAe,KAAM,EAAe,MACjF,EAAe,KAAM,EAAe,GAAI;AAAA,IAClD;AAAA,EACJ;AAAA,EAIA,CAAC,+BAAS,IAAI,EAAE,GAAsB,GAAgC;AAClE,QAAI,OAAO,MAAM,UAAU;AACvB,aAAO,IAAI,UAAS,IAAK,EAAe,IAAK,EAAe,EAAE;AAAA,IAClE,WACS,OAAO,MAAM,UAAU;AAC5B,aAAO,IAAI,UAAU,EAAe,KAAK,GAAI,EAAe,EAAE;AAAA,IAClE,OACK;AACD,aAAO,IAAI,UAAU,EAAe,KAAM,EAAe,IAAK,EAAe,KAAM,EAAe,EAAE;AAAA,IACxG;AAAA,EACJ;AACJ;AA5Fa,UAGK,OAAiB,IAAI,UAAS,GAAG,CAAC;AAH7C,IAAM,WAAN;AA+FG,IAAM,IAAc,IAAI,SAAS,GAAG,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Math/Complex.Internal.ts", "../../Source/Math/Complex.ts"],
3
+ "sources": ["../Source/Math/Complex.Internal.ts", "../Source/Math/Complex.ts"],
4
4
  "sourcesContent": ["/**\n * @file Complex.Internal.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const MathBuiltin: typeof Math = Math;\n", "/**\n * @file Complex.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { MathBuiltin } from \"./Complex.Internal\";\nimport { Operator } from \"tsover-runtime\";\n/**\n * Elements of the complex plane, $\\mathbf{C} = \\mathbf{R}[x] / [ x^2 + 1 ]$.\n */\nexport class FComplex {\n public readonly Re: number;\n public readonly Im: number;\n public static Zero: FComplex = new FComplex(0, 0);\n /**\n * The copy constructor for {@link FComplex} numbers.\n *\n * @param Z - The existing {@link FComplex} number to copy.\n *\n * @example\n * ```typescript\n * const Z: FComplex = 3 + 2 * i;\n * const W: FComplex = new FComplex(Z);\n * // `W.Re === Z.Re` <- `true`\n * // `W.Im === Z.Im` <- `true`\n * ```\n */\n public constructor(Z: FComplex);\n /**\n * Construct an {@link FComplex} number by specifying the real\n * and imaginary components.\n *\n * @param A - The real component of the {@link FComplex} number.\n * @param B - The imaginary component of the {@link FComplex} number.\n *\n * @example\n * ```typescript\n * const Theta: number = 0.5;\n * const OnUnitDisk: FComplex = new FComplex(Math.sin(Theta), Math.cos(Theta));\n * ```\n */\n public constructor(A: number, B: number);\n public constructor(A: FComplex | number, B: number = 0) {\n if (typeof A === \"number\") {\n this.Re = A;\n this.Im = B;\n }\n else {\n this.Re = A.Re;\n this.Im = A.Im;\n }\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Mod(): number {\n return MathBuiltin.sqrt((this.Re ** 2) + (this.Im ** 2));\n }\n /**\n * Get the modulus of this {@link FComplex} number.\n *\n * @returns {number} The modulus of this {@link FComplex} number.\n */\n public get Theta(): number {\n const Out: number = MathBuiltin.atan2(this.Im, this.Re);\n if (Out < 0) {\n return Out + 2 * MathBuiltin.PI;\n }\n return Out;\n }\n [Operator.star](A: FComplex, B: FComplex): FComplex;\n [Operator.star](A: FComplex, B: number): FComplex;\n [Operator.star](A: number, B: FComplex): FComplex;\n [Operator.star](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex((B as FComplex).Re * A, (B as FComplex).Im * A);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re * B, (A as FComplex).Im * B);\n }\n else {\n return new FComplex((((A as FComplex).Re + (B as FComplex).Re) -\n ((A as FComplex).Im + (B as FComplex).Im)), (((A as FComplex).Re + (B as FComplex).Im) +\n ((B as FComplex).Re + (A as FComplex).Im)));\n }\n }\n [Operator.plus](A: FComplex, B: FComplex): FComplex;\n [Operator.plus](A: FComplex, B: number): FComplex;\n [Operator.plus](A: number, B: FComplex): FComplex;\n [Operator.plus](A: FComplex | number, B: number | FComplex): FComplex {\n if (typeof A === \"number\") {\n return new FComplex(A + (B as FComplex).Re, (B as FComplex).Im);\n }\n else if (typeof B === \"number\") {\n return new FComplex((A as FComplex).Re + B, (A as FComplex).Im);\n }\n else {\n return new FComplex((A as FComplex).Re + (B as FComplex).Re, (A as FComplex).Im + (B as FComplex).Im);\n }\n }\n}\nexport /**\n * The imaginary unit.\n */ const i: FComplex = new FComplex(0, 1);\n"],
5
5
  "mappings": ";AAMO,IAAM,cAA2B;;;ACCxC,SAAS,gBAAgB;AAIlB,IAAM,YAAN,MAAM,UAAS;AAAA,EAgCX,YAAY,GAAsB,IAAY,GAAG;AACpD,QAAI,OAAO,MAAM,UAAU;AACvB,WAAK,KAAK;AACV,WAAK,KAAK;AAAA,IACd,OACK;AACD,WAAK,KAAK,EAAE;AACZ,WAAK,KAAK,EAAE;AAAA,IAChB;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,MAAc;AACrB,WAAO,YAAY,KAAM,KAAK,MAAM,IAAM,KAAK,MAAM,CAAE;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,QAAgB;AACvB,UAAM,MAAc,YAAY,MAAM,KAAK,IAAI,KAAK,EAAE;AACtD,QAAI,MAAM,GAAG;AACT,aAAO,MAAM,IAAI,YAAY;AAAA,IACjC;AACA,WAAO;AAAA,EACX;AAAA,EAIA,CAAC,SAAS,IAAI,EAAE,GAAsB,GAAgC;AAClE,QAAI,OAAO,MAAM,UAAU;AACvB,aAAO,IAAI,UAAU,EAAe,KAAK,GAAI,EAAe,KAAK,CAAC;AAAA,IACtE,WACS,OAAO,MAAM,UAAU;AAC5B,aAAO,IAAI,UAAU,EAAe,KAAK,GAAI,EAAe,KAAK,CAAC;AAAA,IACtE,OACK;AACD,aAAO,IAAI,UAAY,EAAe,KAAM,EAAe,MACrD,EAAe,KAAM,EAAe,KAAS,EAAe,KAAM,EAAe,MACjF,EAAe,KAAM,EAAe,GAAI;AAAA,IAClD;AAAA,EACJ;AAAA,EAIA,CAAC,SAAS,IAAI,EAAE,GAAsB,GAAgC;AAClE,QAAI,OAAO,MAAM,UAAU;AACvB,aAAO,IAAI,UAAS,IAAK,EAAe,IAAK,EAAe,EAAE;AAAA,IAClE,WACS,OAAO,MAAM,UAAU;AAC5B,aAAO,IAAI,UAAU,EAAe,KAAK,GAAI,EAAe,EAAE;AAAA,IAClE,OACK;AACD,aAAO,IAAI,UAAU,EAAe,KAAM,EAAe,IAAK,EAAe,KAAM,EAAe,EAAE;AAAA,IACxG;AAAA,EACJ;AACJ;AA5Fa,UAGK,OAAiB,IAAI,UAAS,GAAG,CAAC;AAH7C,IAAM,WAAN;AA+FG,IAAM,IAAc,IAAI,SAAS,GAAG,CAAC;",
6
6
  "names": []
@@ -60,4 +60,4 @@ __reExport(Index_Effect_exports, require("effect"));
60
60
  * @copyright (c) 2026 Gage Sorrell
61
61
  * @license MIT
62
62
  */
63
- //# sourceMappingURL=effect.js.map
63
+ //# sourceMappingURL=effect.cjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Effect/index.ts", "../../Source/Effect/Index.Effect.ts", "../../Source/Effect/Effect.ts"],
3
+ "sources": ["../Source/Effect/index.ts", "../Source/Effect/Index.Effect.ts", "../Source/Effect/Effect.ts"],
4
4
  "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * as Effect from \"./Index.Effect.ts\";\n", "/**\n * @file Index.Effect.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Effect.ts\";\nexport * from \"./Effect.Types.ts\";\nexport * from \"effect\";\n", "/**\n * @file Effect.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const FooEffect: string = \"\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,YAAoB;;;ADEjC,iCAAc;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../Source/Effect/Index.Effect.ts", "../../Source/Effect/Effect.ts"],
3
+ "sources": ["../Source/Effect/Index.Effect.ts", "../Source/Effect/Effect.ts"],
4
4
  "sourcesContent": ["/**\n * @file Index.Effect.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Effect.ts\";\nexport * from \"./Effect.Types.ts\";\nexport * from \"effect\";\n", "/**\n * @file Effect.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport const FooEffect: string = \"\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,YAAoB;;;ADEjC;AAAA,6BAAc;",
6
6
  "names": []
@@ -32,18 +32,19 @@ var FileSystem_exports = {};
32
32
  __export(FileSystem_exports, {
33
33
  GetSafeNewPath: () => GetSafeNewPath,
34
34
  IsSupportedFileExtension: () => IsSupportedFileExtension,
35
- IsValidFileName: () => IsValidFileName
35
+ IsValidFileName: () => IsValidFileName,
36
+ WriteTextFile: () => WriteTextFile
36
37
  });
37
38
  module.exports = __toCommonJS(FileSystem_exports);
38
39
 
39
40
  // Source/FileSystem/FileSystem.ts
40
- var import_promises = require("fs/promises");
41
41
  var import_path = require("path");
42
42
  var import_fs = require("fs");
43
+ var import_fs2 = require("fs");
43
44
  var import_os = __toESM(require("os"), 1);
44
45
  async function PathExists(Path) {
45
46
  try {
46
- await (0, import_promises.access)(Path, import_fs.constants.F_OK);
47
+ await import_fs.promises.access(Path, import_fs2.constants.F_OK);
47
48
  return true;
48
49
  } catch {
49
50
  return false;
@@ -93,16 +94,19 @@ async function IsValidFileName(DirectoryPath, FileName, PersistNewFile = false,
93
94
  }
94
95
  const FilePath = (0, import_path.join)(DirectoryPath, FileName);
95
96
  try {
96
- const ThisFileHandle = await (0, import_promises.open)(FilePath, "wx");
97
+ const ThisFileHandle = await import_fs.promises.open(FilePath, "wx");
97
98
  await ThisFileHandle.close();
98
99
  if (!PersistNewFile) {
99
- await (0, import_promises.unlink)(FilePath);
100
+ await import_fs.promises.unlink(FilePath);
100
101
  }
101
102
  return true;
102
103
  } catch {
103
104
  return false;
104
105
  }
105
106
  }
107
+ async function WriteTextFile(Path, Contents) {
108
+ await import_fs.promises.writeFile(Path, Contents, { encoding: "utf-8" });
109
+ }
106
110
  /**
107
111
  * @file FileSystem.ts
108
112
  * @author Gage Sorrell <gage@sorrell.sh>
@@ -121,4 +125,4 @@ async function IsValidFileName(DirectoryPath, FileName, PersistNewFile = false,
121
125
  * @copyright (c) 2026 Gage Sorrell
122
126
  * @license MIT
123
127
  */
124
- //# sourceMappingURL=fs.js.map
128
+ //# sourceMappingURL=fs.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../Source/FileSystem/index.ts", "../Source/FileSystem/FileSystem.ts"],
4
+ "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./FileSystem.ts\";\nexport * from \"./FileSystem.Types.ts\";\n", "/**\n * @file FileSystem.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { basename, dirname, extname, join } from \"path\";\nimport { type FFileExtension } from \"./FileSystem.Types.ts\";\nimport { type FileHandle } from \"fs/promises\";\nimport { promises as Fs } from \"fs\";\nimport { constants as FsConstants } from \"fs\";\nimport os from \"os\";\nasync function PathExists(Path: string): Promise<boolean> {\n try {\n await Fs.access(Path, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * @param Extension - The file extension that you wish to test.\n * @returns Whether the file extension is valid on the current platform.\n */\nexport function IsSupportedFileExtension(Extension: FFileExtension): boolean {\n let NormalizedExtension: string = Extension.slice(1);\n if (NormalizedExtension.startsWith(\".\")) {\n NormalizedExtension = NormalizedExtension.slice(1);\n }\n if (NormalizedExtension.length === 0) {\n return false;\n }\n if (NormalizedExtension.includes(\"/\")\n || NormalizedExtension.includes(\"\\\\\")\n || NormalizedExtension.includes(\"\\0\")) {\n return false;\n }\n if (os.platform() === \"win32\") {\n /* eslint-disable-next-line no-control-regex */\n const HasIllegalCharacters: boolean = /[<>:\"/\\\\|?*\\x00-\\x1F]/u.test(NormalizedExtension);\n if (HasIllegalCharacters) {\n return false;\n }\n if (/[ .]$/u.test(NormalizedExtension)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Given a path at which we wish to create a new file, check if a file at that\n * path already exists, and if so, then append `(${ number })` before the file\n * extension, consistent with the Windows Explorer handles conflicting file\n * names when pasting files.\n */\nexport async function GetSafeNewPath(InPath: string): Promise<string> {\n const DirectoryPath: string = dirname(InPath);\n const Extension: string = extname(InPath);\n const FileName: string = basename(InPath);\n const BaseFileName: string = Extension === \"\"\n ? FileName\n : basename(InPath, Extension);\n let CandidatePath: string = InPath;\n let Index: number = 1;\n while (await PathExists(CandidatePath)) {\n const CandidateFileName: string = `${BaseFileName} (${Index})${Extension}`;\n CandidatePath = join(DirectoryPath, CandidateFileName);\n Index++;\n }\n return CandidatePath;\n}\n/**\n * @param DirectoryPath - The path to the directory in which you wish to check.\n * @param FileName - The desired file name.\n * @param PersistNewFile - *(Optional)* Whether to keep the otherwise-temporary\n * file created at the desired path.\n * @param Extension - *(Optional)* If provided, the function will only return `true`\n * if `FileName.endsWith(Extension)` *and* the `Extension` is a valid\n * file extension.\n * @returns Whether a file of the given `FileName` can be created in `DirectoryPath`.\n *\n * @remarks This *does* attempt to create a file at the desired path. The file is\n * temporary iff `!PersistNewFile`, and is never created when this function\n * returns `false`.\n */\nexport async function IsValidFileName(DirectoryPath: string, FileName: string, PersistNewFile: boolean = false, Extension: FFileExtension | undefined = undefined): Promise<boolean> {\n const ExtensionSafe: FFileExtension | null | \"\" = Extension !== undefined\n ? (Extension.startsWith(\".\") && IsSupportedFileExtension(Extension))\n ? Extension\n : null\n : \"\";\n const IsExtensionImproper: boolean = (ExtensionSafe === null ||\n ExtensionSafe === \".\" ||\n !FileName.endsWith(ExtensionSafe));\n if (IsExtensionImproper) {\n return false;\n }\n const FilePath: string = join(DirectoryPath, FileName);\n try {\n const ThisFileHandle: FileHandle = await Fs.open(FilePath, \"wx\");\n await ThisFileHandle.close();\n if (!PersistNewFile) {\n await Fs.unlink(FilePath);\n }\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Write a text file to a given {@link Path} having contents {@link Contents}.\n *\n * @param Path - The path of the file that will be written.\n * @param Contents - The text contents of the file to write.\n *\n * @returns {Promise<void>} A {@link Promise} that resolves when the call to {@link Fs.writeFile} resolves.\n *\n * @example\n * ```typescript\n * import { WriteTextFile } from \"@sorrell/utilities/fs\";\n * import { resolve } from \"path\";\n *\n * const MyReadMe: string = \"# ReadMe\\n\\nThis package accomplishes...\\n\";\n * const MyReadMePath: string = resolve(\".\");\n *\n * await WriteTextFile(MyReadMePath, MyReadMe);\n * ```\n */\nexport async function WriteTextFile(Path: string, Contents: string): Promise<void> {\n await Fs.writeFile(Path, Contents, { encoding: \"utf-8\" });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMA,kBAAiD;AAGjD,gBAA+B;AAC/B,IAAAA,aAAyC;AACzC,gBAAe;AACf,eAAe,WAAW,MAAgC;AACtD,MAAI;AACA,UAAM,UAAAC,SAAG,OAAO,MAAM,WAAAC,UAAY,IAAI;AACtC,WAAO;AAAA,EACX,QACM;AACF,WAAO;AAAA,EACX;AACJ;AAKO,SAAS,yBAAyB,WAAoC;AACzE,MAAI,sBAA8B,UAAU,MAAM,CAAC;AACnD,MAAI,oBAAoB,WAAW,GAAG,GAAG;AACrC,0BAAsB,oBAAoB,MAAM,CAAC;AAAA,EACrD;AACA,MAAI,oBAAoB,WAAW,GAAG;AAClC,WAAO;AAAA,EACX;AACA,MAAI,oBAAoB,SAAS,GAAG,KAC7B,oBAAoB,SAAS,IAAI,KACjC,oBAAoB,SAAS,IAAI,GAAG;AACvC,WAAO;AAAA,EACX;AACA,MAAI,UAAAC,QAAG,SAAS,MAAM,SAAS;AAE3B,UAAM,uBAAgC,yBAAyB,KAAK,mBAAmB;AACvF,QAAI,sBAAsB;AACtB,aAAO;AAAA,IACX;AACA,QAAI,SAAS,KAAK,mBAAmB,GAAG;AACpC,aAAO;AAAA,IACX;AAAA,EACJ;AACA,SAAO;AACX;AAOA,eAAsB,eAAe,QAAiC;AAClE,QAAM,oBAAwB,qBAAQ,MAAM;AAC5C,QAAM,gBAAoB,qBAAQ,MAAM;AACxC,QAAM,eAAmB,sBAAS,MAAM;AACxC,QAAM,eAAuB,cAAc,KACrC,eACA,sBAAS,QAAQ,SAAS;AAChC,MAAI,gBAAwB;AAC5B,MAAI,QAAgB;AACpB,SAAO,MAAM,WAAW,aAAa,GAAG;AACpC,UAAM,oBAA4B,GAAG,YAAY,KAAK,KAAK,IAAI,SAAS;AACxE,wBAAgB,kBAAK,eAAe,iBAAiB;AACrD;AAAA,EACJ;AACA,SAAO;AACX;AAeA,eAAsB,gBAAgB,eAAuB,UAAkB,iBAA0B,OAAO,YAAwC,QAA6B;AACjL,QAAM,gBAA4C,cAAc,SACzD,UAAU,WAAW,GAAG,KAAK,yBAAyB,SAAS,IAC5D,YACA,OACJ;AACN,QAAM,sBAAgC,kBAAkB,QACpD,kBAAkB,OAClB,CAAC,SAAS,SAAS,aAAa;AACpC,MAAI,qBAAqB;AACrB,WAAO;AAAA,EACX;AACA,QAAM,eAAmB,kBAAK,eAAe,QAAQ;AACrD,MAAI;AACA,UAAM,iBAA6B,MAAM,UAAAF,SAAG,KAAK,UAAU,IAAI;AAC/D,UAAM,eAAe,MAAM;AAC3B,QAAI,CAAC,gBAAgB;AACjB,YAAM,UAAAA,SAAG,OAAO,QAAQ;AAAA,IAC5B;AACA,WAAO;AAAA,EACX,QACM;AACF,WAAO;AAAA,EACX;AACJ;AAoBA,eAAsB,cAAc,MAAc,UAAiC;AAC/E,QAAM,UAAAA,SAAG,UAAU,MAAM,UAAU,EAAE,UAAU,QAAQ,CAAC;AAC5D;",
6
+ "names": ["import_fs", "Fs", "FsConstants", "os"]
7
+ }
@@ -1,11 +1,11 @@
1
1
  // Source/FileSystem/FileSystem.ts
2
- import { access, open, unlink } from "fs/promises";
3
2
  import { basename, dirname, extname, join } from "path";
3
+ import { promises as Fs } from "fs";
4
4
  import { constants as FsConstants } from "fs";
5
5
  import os from "os";
6
6
  async function PathExists(Path) {
7
7
  try {
8
- await access(Path, FsConstants.F_OK);
8
+ await Fs.access(Path, FsConstants.F_OK);
9
9
  return true;
10
10
  } catch {
11
11
  return false;
@@ -55,20 +55,24 @@ async function IsValidFileName(DirectoryPath, FileName, PersistNewFile = false,
55
55
  }
56
56
  const FilePath = join(DirectoryPath, FileName);
57
57
  try {
58
- const ThisFileHandle = await open(FilePath, "wx");
58
+ const ThisFileHandle = await Fs.open(FilePath, "wx");
59
59
  await ThisFileHandle.close();
60
60
  if (!PersistNewFile) {
61
- await unlink(FilePath);
61
+ await Fs.unlink(FilePath);
62
62
  }
63
63
  return true;
64
64
  } catch {
65
65
  return false;
66
66
  }
67
67
  }
68
+ async function WriteTextFile(Path, Contents) {
69
+ await Fs.writeFile(Path, Contents, { encoding: "utf-8" });
70
+ }
68
71
  export {
69
72
  GetSafeNewPath,
70
73
  IsSupportedFileExtension,
71
- IsValidFileName
74
+ IsValidFileName,
75
+ WriteTextFile
72
76
  };
73
77
  /**
74
78
  * @file FileSystem.ts
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../Source/FileSystem/FileSystem.ts"],
4
+ "sourcesContent": ["/**\n * @file FileSystem.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { basename, dirname, extname, join } from \"path\";\nimport { type FFileExtension } from \"./FileSystem.Types.ts\";\nimport { type FileHandle } from \"fs/promises\";\nimport { promises as Fs } from \"fs\";\nimport { constants as FsConstants } from \"fs\";\nimport os from \"os\";\nasync function PathExists(Path: string): Promise<boolean> {\n try {\n await Fs.access(Path, FsConstants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * @param Extension - The file extension that you wish to test.\n * @returns Whether the file extension is valid on the current platform.\n */\nexport function IsSupportedFileExtension(Extension: FFileExtension): boolean {\n let NormalizedExtension: string = Extension.slice(1);\n if (NormalizedExtension.startsWith(\".\")) {\n NormalizedExtension = NormalizedExtension.slice(1);\n }\n if (NormalizedExtension.length === 0) {\n return false;\n }\n if (NormalizedExtension.includes(\"/\")\n || NormalizedExtension.includes(\"\\\\\")\n || NormalizedExtension.includes(\"\\0\")) {\n return false;\n }\n if (os.platform() === \"win32\") {\n /* eslint-disable-next-line no-control-regex */\n const HasIllegalCharacters: boolean = /[<>:\"/\\\\|?*\\x00-\\x1F]/u.test(NormalizedExtension);\n if (HasIllegalCharacters) {\n return false;\n }\n if (/[ .]$/u.test(NormalizedExtension)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Given a path at which we wish to create a new file, check if a file at that\n * path already exists, and if so, then append `(${ number })` before the file\n * extension, consistent with the Windows Explorer handles conflicting file\n * names when pasting files.\n */\nexport async function GetSafeNewPath(InPath: string): Promise<string> {\n const DirectoryPath: string = dirname(InPath);\n const Extension: string = extname(InPath);\n const FileName: string = basename(InPath);\n const BaseFileName: string = Extension === \"\"\n ? FileName\n : basename(InPath, Extension);\n let CandidatePath: string = InPath;\n let Index: number = 1;\n while (await PathExists(CandidatePath)) {\n const CandidateFileName: string = `${BaseFileName} (${Index})${Extension}`;\n CandidatePath = join(DirectoryPath, CandidateFileName);\n Index++;\n }\n return CandidatePath;\n}\n/**\n * @param DirectoryPath - The path to the directory in which you wish to check.\n * @param FileName - The desired file name.\n * @param PersistNewFile - *(Optional)* Whether to keep the otherwise-temporary\n * file created at the desired path.\n * @param Extension - *(Optional)* If provided, the function will only return `true`\n * if `FileName.endsWith(Extension)` *and* the `Extension` is a valid\n * file extension.\n * @returns Whether a file of the given `FileName` can be created in `DirectoryPath`.\n *\n * @remarks This *does* attempt to create a file at the desired path. The file is\n * temporary iff `!PersistNewFile`, and is never created when this function\n * returns `false`.\n */\nexport async function IsValidFileName(DirectoryPath: string, FileName: string, PersistNewFile: boolean = false, Extension: FFileExtension | undefined = undefined): Promise<boolean> {\n const ExtensionSafe: FFileExtension | null | \"\" = Extension !== undefined\n ? (Extension.startsWith(\".\") && IsSupportedFileExtension(Extension))\n ? Extension\n : null\n : \"\";\n const IsExtensionImproper: boolean = (ExtensionSafe === null ||\n ExtensionSafe === \".\" ||\n !FileName.endsWith(ExtensionSafe));\n if (IsExtensionImproper) {\n return false;\n }\n const FilePath: string = join(DirectoryPath, FileName);\n try {\n const ThisFileHandle: FileHandle = await Fs.open(FilePath, \"wx\");\n await ThisFileHandle.close();\n if (!PersistNewFile) {\n await Fs.unlink(FilePath);\n }\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Write a text file to a given {@link Path} having contents {@link Contents}.\n *\n * @param Path - The path of the file that will be written.\n * @param Contents - The text contents of the file to write.\n *\n * @returns {Promise<void>} A {@link Promise} that resolves when the call to {@link Fs.writeFile} resolves.\n *\n * @example\n * ```typescript\n * import { WriteTextFile } from \"@sorrell/utilities/fs\";\n * import { resolve } from \"path\";\n *\n * const MyReadMe: string = \"# ReadMe\\n\\nThis package accomplishes...\\n\";\n * const MyReadMePath: string = resolve(\".\");\n *\n * await WriteTextFile(MyReadMePath, MyReadMe);\n * ```\n */\nexport async function WriteTextFile(Path: string, Contents: string): Promise<void> {\n await Fs.writeFile(Path, Contents, { encoding: \"utf-8\" });\n}\n"],
5
+ "mappings": ";AAMA,SAAS,UAAU,SAAS,SAAS,YAAY;AAGjD,SAAS,YAAY,UAAU;AAC/B,SAAS,aAAa,mBAAmB;AACzC,OAAO,QAAQ;AACf,eAAe,WAAW,MAAgC;AACtD,MAAI;AACA,UAAM,GAAG,OAAO,MAAM,YAAY,IAAI;AACtC,WAAO;AAAA,EACX,QACM;AACF,WAAO;AAAA,EACX;AACJ;AAKO,SAAS,yBAAyB,WAAoC;AACzE,MAAI,sBAA8B,UAAU,MAAM,CAAC;AACnD,MAAI,oBAAoB,WAAW,GAAG,GAAG;AACrC,0BAAsB,oBAAoB,MAAM,CAAC;AAAA,EACrD;AACA,MAAI,oBAAoB,WAAW,GAAG;AAClC,WAAO;AAAA,EACX;AACA,MAAI,oBAAoB,SAAS,GAAG,KAC7B,oBAAoB,SAAS,IAAI,KACjC,oBAAoB,SAAS,IAAI,GAAG;AACvC,WAAO;AAAA,EACX;AACA,MAAI,GAAG,SAAS,MAAM,SAAS;AAE3B,UAAM,uBAAgC,yBAAyB,KAAK,mBAAmB;AACvF,QAAI,sBAAsB;AACtB,aAAO;AAAA,IACX;AACA,QAAI,SAAS,KAAK,mBAAmB,GAAG;AACpC,aAAO;AAAA,IACX;AAAA,EACJ;AACA,SAAO;AACX;AAOA,eAAsB,eAAe,QAAiC;AAClE,QAAM,gBAAwB,QAAQ,MAAM;AAC5C,QAAM,YAAoB,QAAQ,MAAM;AACxC,QAAM,WAAmB,SAAS,MAAM;AACxC,QAAM,eAAuB,cAAc,KACrC,WACA,SAAS,QAAQ,SAAS;AAChC,MAAI,gBAAwB;AAC5B,MAAI,QAAgB;AACpB,SAAO,MAAM,WAAW,aAAa,GAAG;AACpC,UAAM,oBAA4B,GAAG,YAAY,KAAK,KAAK,IAAI,SAAS;AACxE,oBAAgB,KAAK,eAAe,iBAAiB;AACrD;AAAA,EACJ;AACA,SAAO;AACX;AAeA,eAAsB,gBAAgB,eAAuB,UAAkB,iBAA0B,OAAO,YAAwC,QAA6B;AACjL,QAAM,gBAA4C,cAAc,SACzD,UAAU,WAAW,GAAG,KAAK,yBAAyB,SAAS,IAC5D,YACA,OACJ;AACN,QAAM,sBAAgC,kBAAkB,QACpD,kBAAkB,OAClB,CAAC,SAAS,SAAS,aAAa;AACpC,MAAI,qBAAqB;AACrB,WAAO;AAAA,EACX;AACA,QAAM,WAAmB,KAAK,eAAe,QAAQ;AACrD,MAAI;AACA,UAAM,iBAA6B,MAAM,GAAG,KAAK,UAAU,IAAI;AAC/D,UAAM,eAAe,MAAM;AAC3B,QAAI,CAAC,gBAAgB;AACjB,YAAM,GAAG,OAAO,QAAQ;AAAA,IAC5B;AACA,WAAO;AAAA,EACX,QACM;AACF,WAAO;AAAA,EACX;AACJ;AAoBA,eAAsB,cAAc,MAAc,UAAiC;AAC/E,QAAM,GAAG,UAAU,MAAM,UAAU,EAAE,UAAU,QAAQ,CAAC;AAC5D;",
6
+ "names": []
7
+ }
@@ -46,4 +46,4 @@ function Identity(...Arguments) {
46
46
  * @copyright (c) 2026 Gage Sorrell
47
47
  * @license MIT
48
48
  */
49
- //# sourceMappingURL=functional.js.map
49
+ //# sourceMappingURL=functional.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../Source/Functional/index.ts", "../Source/Functional/Functional.ts"],
4
+ "sourcesContent": ["/**\n * @file index.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nexport * from \"./Functional.ts\";\nexport * from \"./Functional.Types.ts\";\n", "/**\n * @file Functional.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { CurriedArgument } from \"./Functional.Internal\";\nimport type { FCurriedArgument } from \"./Functional.Internal.Types\";\nimport type { TFunction } from \"./Functional.Types\";\nexport function Identity<Type>(...Arguments: Array<Type>) {\n return Arguments;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,SAAS,YAAkB,WAAwB;AACtD,SAAO;AACX;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../Source/Functional/Functional.ts"],
4
+ "sourcesContent": ["/**\n * @file Functional.ts\n * @author Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license MIT\n */\nimport { CurriedArgument } from \"./Functional.Internal\";\nimport type { FCurriedArgument } from \"./Functional.Internal.Types\";\nimport type { TFunction } from \"./Functional.Types\";\nexport function Identity<Type>(...Arguments: Array<Type>) {\n return Arguments;\n}\n"],
5
+ "mappings": ";AASO,SAAS,YAAkB,WAAwB;AACtD,SAAO;AACX;",
6
+ "names": []
7
+ }
@@ -256,17 +256,18 @@ var FileSystem_exports = {};
256
256
  __export(FileSystem_exports, {
257
257
  GetSafeNewPath: () => GetSafeNewPath,
258
258
  IsSupportedFileExtension: () => IsSupportedFileExtension,
259
- IsValidFileName: () => IsValidFileName
259
+ IsValidFileName: () => IsValidFileName,
260
+ WriteTextFile: () => WriteTextFile
260
261
  });
261
262
 
262
263
  // Source/FileSystem/FileSystem.ts
263
- var import_promises = require("fs/promises");
264
264
  var import_path = require("path");
265
265
  var import_fs = require("fs");
266
+ var import_fs2 = require("fs");
266
267
  var import_os = __toESM(require("os"), 1);
267
268
  async function PathExists(Path) {
268
269
  try {
269
- await (0, import_promises.access)(Path, import_fs.constants.F_OK);
270
+ await import_fs.promises.access(Path, import_fs2.constants.F_OK);
270
271
  return true;
271
272
  } catch {
272
273
  return false;
@@ -316,16 +317,19 @@ async function IsValidFileName(DirectoryPath, FileName, PersistNewFile = false,
316
317
  }
317
318
  const FilePath = (0, import_path.join)(DirectoryPath, FileName);
318
319
  try {
319
- const ThisFileHandle = await (0, import_promises.open)(FilePath, "wx");
320
+ const ThisFileHandle = await import_fs.promises.open(FilePath, "wx");
320
321
  await ThisFileHandle.close();
321
322
  if (!PersistNewFile) {
322
- await (0, import_promises.unlink)(FilePath);
323
+ await import_fs.promises.unlink(FilePath);
323
324
  }
324
325
  return true;
325
326
  } catch {
326
327
  return false;
327
328
  }
328
329
  }
330
+ async function WriteTextFile(Path, Contents) {
331
+ await import_fs.promises.writeFile(Path, Contents, { encoding: "utf-8" });
332
+ }
329
333
 
330
334
  // Source/Functional/index.ts
331
335
  var Functional_exports = {};
@@ -471,7 +475,7 @@ __export(Npm_exports, {
471
475
  });
472
476
 
473
477
  // Source/Npm/Npm.ts
474
- var import_fs2 = require("fs");
478
+ var import_fs3 = require("fs");
475
479
 
476
480
  // Source/Npm/Npm.Error.ts
477
481
  var import_effect = require("effect");
@@ -486,23 +490,23 @@ var import_process = __toESM(require("process"), 1);
486
490
  async function GetPackageJson(Path) {
487
491
  const RootDirectory = await GetPackageRootDirectory(Path);
488
492
  const PackageJsonPath = (0, import_path2.join)(RootDirectory, "package.json");
489
- const FileContents = await import_fs2.promises.readFile(PackageJsonPath, "utf-8");
493
+ const FileContents = await import_fs3.promises.readFile(PackageJsonPath, "utf-8");
490
494
  const PackageJson = await (async () => {
491
495
  try {
492
496
  return JSON.parse(FileContents);
493
497
  } catch (Cause) {
494
498
  throw new PackageJsonParseError({ Cause, Path: PackageJsonPath });
495
499
  }
496
- });
500
+ })();
497
501
  return PackageJson;
498
502
  }
499
503
  async function GetPackageRootDirectory(Path) {
500
- let CurrentDirectory = await import_fs2.promises.realpath(Path ?? import_process.default.cwd());
504
+ let CurrentDirectory = await import_fs3.promises.realpath(Path ?? import_process.default.cwd());
501
505
  while (true) {
502
506
  const PackageJsonPath = (0, import_path2.join)(CurrentDirectory, "package.json");
503
507
  const PackageJsonExists = await (async () => {
504
508
  try {
505
- await import_fs2.promises.access(PackageJsonPath, import_fs2.constants.F_OK);
509
+ await import_fs3.promises.access(PackageJsonPath, import_fs3.constants.F_OK);
506
510
  return true;
507
511
  } catch {
508
512
  return false;
@@ -694,4 +698,4 @@ function IsNumeric(In) {
694
698
  * @copyright (c) 2026 Gage Sorrell
695
699
  * @license MIT
696
700
  */
697
- //# sourceMappingURL=index.js.map
701
+ //# sourceMappingURL=index.cjs.map