@sorrell/utilities 1.2.2 → 1.2.5
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.
- package/ReadMe.md +4 -0
- package/package.json +12 -3
- package/Distribution/PackageExports.Generated.json +0 -122
- package/Distribution/Types/Array/Array.Internal.Types.d.cts +0 -43
- package/Distribution/Types/Array/Array.Internal.Types.d.cts.map +0 -10
- package/Distribution/Types/Array/Array.Internal.Types.d.mts +0 -43
- package/Distribution/Types/Array/Array.Internal.Types.d.mts.map +0 -10
- package/Distribution/Types/Array/Array.Internal.Types.d.ts +0 -43
- package/Distribution/Types/Array/Array.Internal.Types.d.ts.map +0 -1
- package/Distribution/Types/Array/Array.Internal.d.cts +0 -16
- package/Distribution/Types/Array/Array.Internal.d.cts.map +0 -10
- package/Distribution/Types/Array/Array.Internal.d.mts +0 -16
- package/Distribution/Types/Array/Array.Internal.d.mts.map +0 -10
- package/Distribution/Types/Array/Array.Internal.d.ts +0 -16
- package/Distribution/Types/Array/Array.Internal.d.ts.map +0 -1
- package/Distribution/Types/Array/Array.Types.d.cts +0 -92
- package/Distribution/Types/Array/Array.Types.d.cts.map +0 -10
- package/Distribution/Types/Array/Array.Types.d.mts +0 -92
- package/Distribution/Types/Array/Array.Types.d.mts.map +0 -10
- package/Distribution/Types/Array/Array.Types.d.ts +0 -92
- package/Distribution/Types/Array/Array.Types.d.ts.map +0 -1
- package/Distribution/Types/Array/Array.d.cts +0 -33
- package/Distribution/Types/Array/Array.d.cts.map +0 -10
- package/Distribution/Types/Array/Array.d.mts +0 -33
- package/Distribution/Types/Array/Array.d.mts.map +0 -10
- package/Distribution/Types/Array/Array.d.ts +0 -33
- package/Distribution/Types/Array/Array.d.ts.map +0 -1
- package/Distribution/Types/Array/index.d.cts +0 -9
- package/Distribution/Types/Array/index.d.cts.map +0 -10
- package/Distribution/Types/Array/index.d.mts +0 -9
- package/Distribution/Types/Array/index.d.mts.map +0 -10
- package/Distribution/Types/Array/index.d.ts +0 -9
- package/Distribution/Types/Array/index.d.ts.map +0 -1
- package/Distribution/Types/Async/Async.Types.d.cts +0 -150
- package/Distribution/Types/Async/Async.Types.d.cts.map +0 -10
- package/Distribution/Types/Async/Async.Types.d.mts +0 -150
- package/Distribution/Types/Async/Async.Types.d.mts.map +0 -10
- package/Distribution/Types/Async/Async.Types.d.ts +0 -150
- package/Distribution/Types/Async/Async.Types.d.ts.map +0 -1
- package/Distribution/Types/Async/Async.d.cts +0 -145
- package/Distribution/Types/Async/Async.d.cts.map +0 -10
- package/Distribution/Types/Async/Async.d.mts +0 -145
- package/Distribution/Types/Async/Async.d.mts.map +0 -10
- package/Distribution/Types/Async/Async.d.ts +0 -145
- package/Distribution/Types/Async/Async.d.ts.map +0 -1
- package/Distribution/Types/Async/index.d.cts +0 -9
- package/Distribution/Types/Async/index.d.cts.map +0 -10
- package/Distribution/Types/Async/index.d.mts +0 -9
- package/Distribution/Types/Async/index.d.mts.map +0 -10
- package/Distribution/Types/Async/index.d.ts +0 -9
- package/Distribution/Types/Async/index.d.ts.map +0 -1
- package/Distribution/Types/Effect/Effect.Types.d.cts +0 -16
- package/Distribution/Types/Effect/Effect.Types.d.cts.map +0 -10
- package/Distribution/Types/Effect/Effect.Types.d.mts +0 -16
- package/Distribution/Types/Effect/Effect.Types.d.mts.map +0 -10
- package/Distribution/Types/Effect/Effect.Types.d.ts +0 -16
- package/Distribution/Types/Effect/Effect.Types.d.ts.map +0 -1
- package/Distribution/Types/Effect/Effect.d.cts +0 -8
- package/Distribution/Types/Effect/Effect.d.cts.map +0 -10
- package/Distribution/Types/Effect/Effect.d.mts +0 -8
- package/Distribution/Types/Effect/Effect.d.mts.map +0 -10
- package/Distribution/Types/Effect/Effect.d.ts +0 -8
- package/Distribution/Types/Effect/Effect.d.ts.map +0 -1
- package/Distribution/Types/Effect/Index.Effect.d.cts +0 -10
- package/Distribution/Types/Effect/Index.Effect.d.cts.map +0 -10
- package/Distribution/Types/Effect/Index.Effect.d.mts +0 -10
- package/Distribution/Types/Effect/Index.Effect.d.mts.map +0 -10
- package/Distribution/Types/Effect/Index.Effect.d.ts +0 -10
- package/Distribution/Types/Effect/Index.Effect.d.ts.map +0 -1
- package/Distribution/Types/Effect/index.d.cts +0 -8
- package/Distribution/Types/Effect/index.d.cts.map +0 -10
- package/Distribution/Types/Effect/index.d.mts +0 -8
- package/Distribution/Types/Effect/index.d.mts.map +0 -10
- package/Distribution/Types/Effect/index.d.ts +0 -8
- package/Distribution/Types/Effect/index.d.ts.map +0 -1
- package/Distribution/Types/FileSystem/FileSystem.Types.d.cts +0 -8
- package/Distribution/Types/FileSystem/FileSystem.Types.d.cts.map +0 -10
- package/Distribution/Types/FileSystem/FileSystem.Types.d.mts +0 -8
- package/Distribution/Types/FileSystem/FileSystem.Types.d.mts.map +0 -10
- package/Distribution/Types/FileSystem/FileSystem.Types.d.ts +0 -8
- package/Distribution/Types/FileSystem/FileSystem.Types.d.ts.map +0 -1
- package/Distribution/Types/FileSystem/FileSystem.d.cts +0 -55
- package/Distribution/Types/FileSystem/FileSystem.d.cts.map +0 -10
- package/Distribution/Types/FileSystem/FileSystem.d.mts +0 -55
- package/Distribution/Types/FileSystem/FileSystem.d.mts.map +0 -10
- package/Distribution/Types/FileSystem/FileSystem.d.ts +0 -55
- package/Distribution/Types/FileSystem/FileSystem.d.ts.map +0 -1
- package/Distribution/Types/FileSystem/index.d.cts +0 -9
- package/Distribution/Types/FileSystem/index.d.cts.map +0 -10
- package/Distribution/Types/FileSystem/index.d.mts +0 -9
- package/Distribution/Types/FileSystem/index.d.mts.map +0 -10
- package/Distribution/Types/FileSystem/index.d.ts +0 -9
- package/Distribution/Types/FileSystem/index.d.ts.map +0 -1
- package/Distribution/Types/Functional/Functional.Internal.Types.d.cts +0 -9
- package/Distribution/Types/Functional/Functional.Internal.Types.d.cts.map +0 -10
- package/Distribution/Types/Functional/Functional.Internal.Types.d.mts +0 -9
- package/Distribution/Types/Functional/Functional.Internal.Types.d.mts.map +0 -10
- package/Distribution/Types/Functional/Functional.Internal.Types.d.ts +0 -9
- package/Distribution/Types/Functional/Functional.Internal.Types.d.ts.map +0 -1
- package/Distribution/Types/Functional/Functional.Internal.d.cts +0 -8
- package/Distribution/Types/Functional/Functional.Internal.d.cts.map +0 -10
- package/Distribution/Types/Functional/Functional.Internal.d.mts +0 -8
- package/Distribution/Types/Functional/Functional.Internal.d.mts.map +0 -10
- package/Distribution/Types/Functional/Functional.Internal.d.ts +0 -8
- package/Distribution/Types/Functional/Functional.Internal.d.ts.map +0 -1
- package/Distribution/Types/Functional/Functional.Types.d.cts +0 -28
- package/Distribution/Types/Functional/Functional.Types.d.cts.map +0 -10
- package/Distribution/Types/Functional/Functional.Types.d.mts +0 -28
- package/Distribution/Types/Functional/Functional.Types.d.mts.map +0 -10
- package/Distribution/Types/Functional/Functional.Types.d.ts +0 -28
- package/Distribution/Types/Functional/Functional.Types.d.ts.map +0 -1
- package/Distribution/Types/Functional/Functional.d.cts +0 -8
- package/Distribution/Types/Functional/Functional.d.cts.map +0 -10
- package/Distribution/Types/Functional/Functional.d.mts +0 -8
- package/Distribution/Types/Functional/Functional.d.mts.map +0 -10
- package/Distribution/Types/Functional/Functional.d.ts +0 -8
- package/Distribution/Types/Functional/Functional.d.ts.map +0 -1
- package/Distribution/Types/Functional/index.d.cts +0 -9
- package/Distribution/Types/Functional/index.d.cts.map +0 -10
- package/Distribution/Types/Functional/index.d.mts +0 -9
- package/Distribution/Types/Functional/index.d.mts.map +0 -10
- package/Distribution/Types/Functional/index.d.ts +0 -9
- package/Distribution/Types/Functional/index.d.ts.map +0 -1
- package/Distribution/Types/Math/Complex.Internal.d.cts +0 -8
- package/Distribution/Types/Math/Complex.Internal.d.cts.map +0 -10
- package/Distribution/Types/Math/Complex.Internal.d.mts +0 -8
- package/Distribution/Types/Math/Complex.Internal.d.mts.map +0 -10
- package/Distribution/Types/Math/Complex.Internal.d.ts +0 -8
- package/Distribution/Types/Math/Complex.Internal.d.ts.map +0 -1
- package/Distribution/Types/Math/Complex.Types.d.cts +0 -69
- package/Distribution/Types/Math/Complex.Types.d.cts.map +0 -10
- package/Distribution/Types/Math/Complex.Types.d.mts +0 -69
- package/Distribution/Types/Math/Complex.Types.d.mts.map +0 -10
- package/Distribution/Types/Math/Complex.Types.d.ts +0 -69
- package/Distribution/Types/Math/Complex.Types.d.ts.map +0 -1
- package/Distribution/Types/Math/Complex.d.cts +0 -63
- package/Distribution/Types/Math/Complex.d.cts.map +0 -10
- package/Distribution/Types/Math/Complex.d.mts +0 -63
- package/Distribution/Types/Math/Complex.d.mts.map +0 -10
- package/Distribution/Types/Math/Complex.d.ts +0 -63
- package/Distribution/Types/Math/Complex.d.ts.map +0 -1
- package/Distribution/Types/Math/Index.Complex.d.cts +0 -9
- package/Distribution/Types/Math/Index.Complex.d.cts.map +0 -10
- package/Distribution/Types/Math/Index.Complex.d.mts +0 -9
- package/Distribution/Types/Math/Index.Complex.d.mts.map +0 -10
- package/Distribution/Types/Math/Index.Complex.d.ts +0 -9
- package/Distribution/Types/Math/Index.Complex.d.ts.map +0 -1
- package/Distribution/Types/Math/Index.Experimental.d.cts +0 -10
- package/Distribution/Types/Math/Index.Experimental.d.cts.map +0 -10
- package/Distribution/Types/Math/Index.Experimental.d.mts +0 -10
- package/Distribution/Types/Math/Index.Experimental.d.mts.map +0 -10
- package/Distribution/Types/Math/Index.Experimental.d.ts +0 -10
- package/Distribution/Types/Math/Index.Experimental.d.ts.map +0 -1
- package/Distribution/Types/Math/Math.Internal.Types.d.cts +0 -47
- package/Distribution/Types/Math/Math.Internal.Types.d.cts.map +0 -10
- package/Distribution/Types/Math/Math.Internal.Types.d.mts +0 -47
- package/Distribution/Types/Math/Math.Internal.Types.d.mts.map +0 -10
- package/Distribution/Types/Math/Math.Internal.Types.d.ts +0 -47
- package/Distribution/Types/Math/Math.Internal.Types.d.ts.map +0 -1
- package/Distribution/Types/Math/Math.Types.d.cts +0 -92
- package/Distribution/Types/Math/Math.Types.d.cts.map +0 -10
- package/Distribution/Types/Math/Math.Types.d.mts +0 -92
- package/Distribution/Types/Math/Math.Types.d.mts.map +0 -10
- package/Distribution/Types/Math/Math.Types.d.ts +0 -92
- package/Distribution/Types/Math/Math.Types.d.ts.map +0 -1
- package/Distribution/Types/Math/Math.d.cts +0 -8
- package/Distribution/Types/Math/Math.d.cts.map +0 -10
- package/Distribution/Types/Math/Math.d.mts +0 -8
- package/Distribution/Types/Math/Math.d.mts.map +0 -10
- package/Distribution/Types/Math/Math.d.ts +0 -8
- package/Distribution/Types/Math/Math.d.ts.map +0 -1
- package/Distribution/Types/Math/Vector.d.cts +0 -102
- package/Distribution/Types/Math/Vector.d.cts.map +0 -10
- package/Distribution/Types/Math/Vector.d.mts +0 -102
- package/Distribution/Types/Math/Vector.d.mts.map +0 -10
- package/Distribution/Types/Math/Vector.d.ts +0 -102
- package/Distribution/Types/Math/Vector.d.ts.map +0 -1
- package/Distribution/Types/Math/index.d.cts +0 -15
- package/Distribution/Types/Math/index.d.cts.map +0 -10
- package/Distribution/Types/Math/index.d.mts +0 -15
- package/Distribution/Types/Math/index.d.mts.map +0 -10
- package/Distribution/Types/Math/index.d.ts +0 -15
- package/Distribution/Types/Math/index.d.ts.map +0 -1
- package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts +0 -8
- package/Distribution/Types/Miscellaneous/Utility.Internal.d.cts.map +0 -10
- package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts +0 -8
- package/Distribution/Types/Miscellaneous/Utility.Internal.d.mts.map +0 -10
- package/Distribution/Types/Miscellaneous/Utility.Internal.d.ts +0 -8
- package/Distribution/Types/Miscellaneous/Utility.Internal.d.ts.map +0 -1
- package/Distribution/Types/Miscellaneous/Utility.Types.d.cts +0 -104
- package/Distribution/Types/Miscellaneous/Utility.Types.d.cts.map +0 -10
- package/Distribution/Types/Miscellaneous/Utility.Types.d.mts +0 -104
- package/Distribution/Types/Miscellaneous/Utility.Types.d.mts.map +0 -10
- package/Distribution/Types/Miscellaneous/Utility.Types.d.ts +0 -104
- package/Distribution/Types/Miscellaneous/Utility.Types.d.ts.map +0 -1
- package/Distribution/Types/Miscellaneous/index.d.cts +0 -8
- package/Distribution/Types/Miscellaneous/index.d.cts.map +0 -10
- package/Distribution/Types/Miscellaneous/index.d.mts +0 -8
- package/Distribution/Types/Miscellaneous/index.d.mts.map +0 -10
- package/Distribution/Types/Miscellaneous/index.d.ts +0 -8
- package/Distribution/Types/Miscellaneous/index.d.ts.map +0 -1
- package/Distribution/Types/Npm/Index.Effect.d.cts +0 -9
- package/Distribution/Types/Npm/Index.Effect.d.cts.map +0 -10
- package/Distribution/Types/Npm/Index.Effect.d.mts +0 -9
- package/Distribution/Types/Npm/Index.Effect.d.mts.map +0 -10
- package/Distribution/Types/Npm/Index.Effect.d.ts +0 -9
- package/Distribution/Types/Npm/Index.Effect.d.ts.map +0 -1
- package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts +0 -17
- package/Distribution/Types/Npm/Npm.Effect.Internal.d.cts.map +0 -10
- package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts +0 -17
- package/Distribution/Types/Npm/Npm.Effect.Internal.d.mts.map +0 -10
- package/Distribution/Types/Npm/Npm.Effect.Internal.d.ts +0 -17
- package/Distribution/Types/Npm/Npm.Effect.Internal.d.ts.map +0 -1
- package/Distribution/Types/Npm/Npm.Effect.Types.d.cts +0 -12
- package/Distribution/Types/Npm/Npm.Effect.Types.d.cts.map +0 -10
- package/Distribution/Types/Npm/Npm.Effect.Types.d.mts +0 -12
- package/Distribution/Types/Npm/Npm.Effect.Types.d.mts.map +0 -10
- package/Distribution/Types/Npm/Npm.Effect.Types.d.ts +0 -12
- package/Distribution/Types/Npm/Npm.Effect.Types.d.ts.map +0 -1
- package/Distribution/Types/Npm/Npm.Effect.d.cts +0 -92
- package/Distribution/Types/Npm/Npm.Effect.d.cts.map +0 -10
- package/Distribution/Types/Npm/Npm.Effect.d.mts +0 -92
- package/Distribution/Types/Npm/Npm.Effect.d.mts.map +0 -10
- package/Distribution/Types/Npm/Npm.Effect.d.ts +0 -92
- package/Distribution/Types/Npm/Npm.Effect.d.ts.map +0 -1
- package/Distribution/Types/Npm/Npm.Error.d.cts +0 -36
- package/Distribution/Types/Npm/Npm.Error.d.cts.map +0 -10
- package/Distribution/Types/Npm/Npm.Error.d.mts +0 -36
- package/Distribution/Types/Npm/Npm.Error.d.mts.map +0 -10
- package/Distribution/Types/Npm/Npm.Error.d.ts +0 -36
- package/Distribution/Types/Npm/Npm.Error.d.ts.map +0 -1
- package/Distribution/Types/Npm/Npm.d.cts +0 -91
- package/Distribution/Types/Npm/Npm.d.cts.map +0 -10
- package/Distribution/Types/Npm/Npm.d.mts +0 -91
- package/Distribution/Types/Npm/Npm.d.mts.map +0 -10
- package/Distribution/Types/Npm/Npm.d.ts +0 -91
- package/Distribution/Types/Npm/Npm.d.ts.map +0 -1
- package/Distribution/Types/Npm/index.d.cts +0 -15
- package/Distribution/Types/Npm/index.d.cts.map +0 -10
- package/Distribution/Types/Npm/index.d.mts +0 -15
- package/Distribution/Types/Npm/index.d.mts.map +0 -10
- package/Distribution/Types/Npm/index.d.ts +0 -15
- package/Distribution/Types/Npm/index.d.ts.map +0 -1
- package/Distribution/Types/Path/Path.d.cts +0 -17
- package/Distribution/Types/Path/Path.d.cts.map +0 -10
- package/Distribution/Types/Path/Path.d.mts +0 -17
- package/Distribution/Types/Path/Path.d.mts.map +0 -10
- package/Distribution/Types/Path/Path.d.ts +0 -17
- package/Distribution/Types/Path/Path.d.ts.map +0 -1
- package/Distribution/Types/Path/index.d.cts +0 -8
- package/Distribution/Types/Path/index.d.cts.map +0 -10
- package/Distribution/Types/Path/index.d.mts +0 -8
- package/Distribution/Types/Path/index.d.mts.map +0 -10
- package/Distribution/Types/Path/index.d.ts +0 -8
- package/Distribution/Types/Path/index.d.ts.map +0 -1
- package/Distribution/Types/String/String.d.cts +0 -28
- package/Distribution/Types/String/String.d.cts.map +0 -10
- package/Distribution/Types/String/String.d.mts +0 -28
- package/Distribution/Types/String/String.d.mts.map +0 -10
- package/Distribution/Types/String/String.d.ts +0 -28
- package/Distribution/Types/String/String.d.ts.map +0 -1
- package/Distribution/Types/String/index.d.cts +0 -8
- package/Distribution/Types/String/index.d.cts.map +0 -10
- package/Distribution/Types/String/index.d.mts +0 -8
- package/Distribution/Types/String/index.d.mts.map +0 -10
- package/Distribution/Types/String/index.d.ts +0 -8
- package/Distribution/Types/String/index.d.ts.map +0 -1
- package/Distribution/Types/index.d.cts +0 -24
- package/Distribution/Types/index.d.cts.map +0 -10
- package/Distribution/Types/index.d.mts +0 -24
- package/Distribution/Types/index.d.mts.map +0 -10
- package/Distribution/Types/index.d.ts +0 -24
- package/Distribution/Types/index.d.ts.map +0 -1
- package/Distribution/array.cjs +0 -51
- package/Distribution/array.cjs.map +0 -7
- package/Distribution/array.js +0 -28
- package/Distribution/array.js.map +0 -7
- package/Distribution/async.cjs +0 -174
- package/Distribution/async.cjs.map +0 -7
- package/Distribution/async.js +0 -151
- package/Distribution/async.js.map +0 -7
- package/Distribution/complex.cjs +0 -97
- package/Distribution/complex.cjs.map +0 -7
- package/Distribution/complex.js +0 -74
- package/Distribution/complex.js.map +0 -7
- package/Distribution/effect.cjs +0 -63
- package/Distribution/effect.cjs.map +0 -7
- package/Distribution/effect.js +0 -58
- package/Distribution/effect.js.map +0 -7
- package/Distribution/fs.cjs +0 -128
- package/Distribution/fs.cjs.map +0 -7
- package/Distribution/fs.js +0 -95
- package/Distribution/fs.js.map +0 -7
- package/Distribution/functional.cjs +0 -49
- package/Distribution/functional.cjs.map +0 -7
- package/Distribution/functional.js +0 -26
- package/Distribution/functional.js.map +0 -7
- package/Distribution/index.cjs +0 -701
- package/Distribution/index.cjs.map +0 -7
- package/Distribution/index.js +0 -674
- package/Distribution/index.js.map +0 -7
- package/Distribution/math.cjs +0 -243
- package/Distribution/math.cjs.map +0 -7
- package/Distribution/math.js +0 -226
- package/Distribution/math.js.map +0 -7
- package/Distribution/misc.cjs +0 -45
- package/Distribution/misc.cjs.map +0 -7
- package/Distribution/misc.js +0 -22
- package/Distribution/misc.js.map +0 -7
- package/Distribution/npm-effect.cjs +0 -130
- package/Distribution/npm-effect.cjs.map +0 -7
- package/Distribution/npm-effect.js +0 -97
- package/Distribution/npm-effect.js.map +0 -7
- package/Distribution/npm.cjs +0 -106
- package/Distribution/npm.cjs.map +0 -7
- package/Distribution/npm.js +0 -73
- package/Distribution/npm.js.map +0 -7
- package/Distribution/path.cjs +0 -63
- package/Distribution/path.cjs.map +0 -7
- package/Distribution/path.js +0 -40
- package/Distribution/path.js.map +0 -7
package/Distribution/complex.cjs
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// Source/Math/Complex.ts
|
|
21
|
-
var Complex_exports = {};
|
|
22
|
-
__export(Complex_exports, {
|
|
23
|
-
FComplex: () => FComplex,
|
|
24
|
-
i: () => i
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(Complex_exports);
|
|
27
|
-
|
|
28
|
-
// Source/Math/Complex.Internal.ts
|
|
29
|
-
var MathBuiltin = Math;
|
|
30
|
-
|
|
31
|
-
// Source/Math/Complex.ts
|
|
32
|
-
var import_tsover_runtime = require("tsover-runtime");
|
|
33
|
-
var _FComplex = class _FComplex {
|
|
34
|
-
constructor(A, B = 0) {
|
|
35
|
-
if (typeof A === "number") {
|
|
36
|
-
this.Re = A;
|
|
37
|
-
this.Im = B;
|
|
38
|
-
} else {
|
|
39
|
-
this.Re = A.Re;
|
|
40
|
-
this.Im = A.Im;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Get the modulus of this {@link FComplex} number.
|
|
45
|
-
*
|
|
46
|
-
* @returns {number} The modulus of this {@link FComplex} number.
|
|
47
|
-
*/
|
|
48
|
-
get Mod() {
|
|
49
|
-
return MathBuiltin.sqrt(this.Re ** 2 + this.Im ** 2);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Get the modulus of this {@link FComplex} number.
|
|
53
|
-
*
|
|
54
|
-
* @returns {number} The modulus of this {@link FComplex} number.
|
|
55
|
-
*/
|
|
56
|
-
get Theta() {
|
|
57
|
-
const Out = MathBuiltin.atan2(this.Im, this.Re);
|
|
58
|
-
if (Out < 0) {
|
|
59
|
-
return Out + 2 * MathBuiltin.PI;
|
|
60
|
-
}
|
|
61
|
-
return Out;
|
|
62
|
-
}
|
|
63
|
-
[import_tsover_runtime.Operator.star](A, B) {
|
|
64
|
-
if (typeof A === "number") {
|
|
65
|
-
return new _FComplex(B.Re * A, B.Im * A);
|
|
66
|
-
} else if (typeof B === "number") {
|
|
67
|
-
return new _FComplex(A.Re * B, A.Im * B);
|
|
68
|
-
} else {
|
|
69
|
-
return new _FComplex(A.Re + B.Re - (A.Im + B.Im), A.Re + B.Im + (B.Re + A.Im));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
[import_tsover_runtime.Operator.plus](A, B) {
|
|
73
|
-
if (typeof A === "number") {
|
|
74
|
-
return new _FComplex(A + B.Re, B.Im);
|
|
75
|
-
} else if (typeof B === "number") {
|
|
76
|
-
return new _FComplex(A.Re + B, A.Im);
|
|
77
|
-
} else {
|
|
78
|
-
return new _FComplex(A.Re + B.Re, A.Im + B.Im);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
_FComplex.Zero = new _FComplex(0, 0);
|
|
83
|
-
var FComplex = _FComplex;
|
|
84
|
-
var i = new FComplex(0, 1);
|
|
85
|
-
/**
|
|
86
|
-
* @file Complex.Internal.ts
|
|
87
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
88
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
89
|
-
* @license MIT
|
|
90
|
-
*/
|
|
91
|
-
/**
|
|
92
|
-
* @file Complex.ts
|
|
93
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
94
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
95
|
-
* @license MIT
|
|
96
|
-
*/
|
|
97
|
-
//# sourceMappingURL=complex.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../Source/Math/Complex.ts", "../Source/Math/Complex.Internal.ts"],
|
|
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
|
-
"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
|
-
"names": []
|
|
7
|
-
}
|
package/Distribution/complex.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// Source/Math/Complex.Internal.ts
|
|
2
|
-
var MathBuiltin = Math;
|
|
3
|
-
|
|
4
|
-
// Source/Math/Complex.ts
|
|
5
|
-
import { Operator } from "tsover-runtime";
|
|
6
|
-
var _FComplex = class _FComplex {
|
|
7
|
-
constructor(A, B = 0) {
|
|
8
|
-
if (typeof A === "number") {
|
|
9
|
-
this.Re = A;
|
|
10
|
-
this.Im = B;
|
|
11
|
-
} else {
|
|
12
|
-
this.Re = A.Re;
|
|
13
|
-
this.Im = A.Im;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Get the modulus of this {@link FComplex} number.
|
|
18
|
-
*
|
|
19
|
-
* @returns {number} The modulus of this {@link FComplex} number.
|
|
20
|
-
*/
|
|
21
|
-
get Mod() {
|
|
22
|
-
return MathBuiltin.sqrt(this.Re ** 2 + this.Im ** 2);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Get the modulus of this {@link FComplex} number.
|
|
26
|
-
*
|
|
27
|
-
* @returns {number} The modulus of this {@link FComplex} number.
|
|
28
|
-
*/
|
|
29
|
-
get Theta() {
|
|
30
|
-
const Out = MathBuiltin.atan2(this.Im, this.Re);
|
|
31
|
-
if (Out < 0) {
|
|
32
|
-
return Out + 2 * MathBuiltin.PI;
|
|
33
|
-
}
|
|
34
|
-
return Out;
|
|
35
|
-
}
|
|
36
|
-
[Operator.star](A, B) {
|
|
37
|
-
if (typeof A === "number") {
|
|
38
|
-
return new _FComplex(B.Re * A, B.Im * A);
|
|
39
|
-
} else if (typeof B === "number") {
|
|
40
|
-
return new _FComplex(A.Re * B, A.Im * B);
|
|
41
|
-
} else {
|
|
42
|
-
return new _FComplex(A.Re + B.Re - (A.Im + B.Im), A.Re + B.Im + (B.Re + A.Im));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
[Operator.plus](A, B) {
|
|
46
|
-
if (typeof A === "number") {
|
|
47
|
-
return new _FComplex(A + B.Re, B.Im);
|
|
48
|
-
} else if (typeof B === "number") {
|
|
49
|
-
return new _FComplex(A.Re + B, A.Im);
|
|
50
|
-
} else {
|
|
51
|
-
return new _FComplex(A.Re + B.Re, A.Im + B.Im);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
_FComplex.Zero = new _FComplex(0, 0);
|
|
56
|
-
var FComplex = _FComplex;
|
|
57
|
-
var i = new FComplex(0, 1);
|
|
58
|
-
export {
|
|
59
|
-
FComplex,
|
|
60
|
-
i
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* @file Complex.Internal.ts
|
|
64
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
65
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
66
|
-
* @license MIT
|
|
67
|
-
*/
|
|
68
|
-
/**
|
|
69
|
-
* @file Complex.ts
|
|
70
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
71
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
72
|
-
* @license MIT
|
|
73
|
-
*/
|
|
74
|
-
//# sourceMappingURL=complex.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../Source/Math/Complex.Internal.ts", "../Source/Math/Complex.ts"],
|
|
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
|
-
"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
|
-
"names": []
|
|
7
|
-
}
|
package/Distribution/effect.cjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// Source/Effect/index.ts
|
|
22
|
-
var Effect_exports = {};
|
|
23
|
-
__export(Effect_exports, {
|
|
24
|
-
Effect: () => Index_Effect_exports
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(Effect_exports);
|
|
27
|
-
|
|
28
|
-
// Source/Effect/Index.Effect.ts
|
|
29
|
-
var Index_Effect_exports = {};
|
|
30
|
-
__export(Index_Effect_exports, {
|
|
31
|
-
FooEffect: () => FooEffect
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// Source/Effect/Effect.ts
|
|
35
|
-
var FooEffect = "";
|
|
36
|
-
|
|
37
|
-
// Source/Effect/Index.Effect.ts
|
|
38
|
-
__reExport(Index_Effect_exports, require("effect"));
|
|
39
|
-
/**
|
|
40
|
-
* @file Effect.ts
|
|
41
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
42
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
43
|
-
* @license MIT
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* @file Effect.Types.ts
|
|
47
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
48
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
49
|
-
* @license MIT
|
|
50
|
-
*/
|
|
51
|
-
/**
|
|
52
|
-
* @file Index.Effect.ts
|
|
53
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
54
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
55
|
-
* @license MIT
|
|
56
|
-
*/
|
|
57
|
-
/**
|
|
58
|
-
* @file index.ts
|
|
59
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
60
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
61
|
-
* @license MIT
|
|
62
|
-
*/
|
|
63
|
-
//# sourceMappingURL=effect.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../Source/Effect/index.ts", "../Source/Effect/Index.Effect.ts", "../Source/Effect/Effect.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 * 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
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,YAAoB;;;ADEjC,iCAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/Distribution/effect.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
-
|
|
19
|
-
// Source/Effect/Index.Effect.ts
|
|
20
|
-
var Index_Effect_exports = {};
|
|
21
|
-
__export(Index_Effect_exports, {
|
|
22
|
-
FooEffect: () => FooEffect
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Source/Effect/Effect.ts
|
|
26
|
-
var FooEffect = "";
|
|
27
|
-
|
|
28
|
-
// Source/Effect/Index.Effect.ts
|
|
29
|
-
__reExport(Index_Effect_exports, effect_star);
|
|
30
|
-
import * as effect_star from "effect";
|
|
31
|
-
export {
|
|
32
|
-
Index_Effect_exports as Effect
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* @file Effect.ts
|
|
36
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
37
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
38
|
-
* @license MIT
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
* @file Effect.Types.ts
|
|
42
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
43
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
44
|
-
* @license MIT
|
|
45
|
-
*/
|
|
46
|
-
/**
|
|
47
|
-
* @file Index.Effect.ts
|
|
48
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
49
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
50
|
-
* @license MIT
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* @file index.ts
|
|
54
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
55
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
56
|
-
* @license MIT
|
|
57
|
-
*/
|
|
58
|
-
//# sourceMappingURL=effect.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../Source/Effect/Index.Effect.ts", "../Source/Effect/Effect.ts"],
|
|
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
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,YAAoB;;;ADEjC;AAAA,6BAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/Distribution/fs.cjs
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// Source/FileSystem/index.ts
|
|
31
|
-
var FileSystem_exports = {};
|
|
32
|
-
__export(FileSystem_exports, {
|
|
33
|
-
GetSafeNewPath: () => GetSafeNewPath,
|
|
34
|
-
IsSupportedFileExtension: () => IsSupportedFileExtension,
|
|
35
|
-
IsValidFileName: () => IsValidFileName,
|
|
36
|
-
WriteTextFile: () => WriteTextFile
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(FileSystem_exports);
|
|
39
|
-
|
|
40
|
-
// Source/FileSystem/FileSystem.ts
|
|
41
|
-
var import_path = require("path");
|
|
42
|
-
var import_fs = require("fs");
|
|
43
|
-
var import_fs2 = require("fs");
|
|
44
|
-
var import_os = __toESM(require("os"), 1);
|
|
45
|
-
async function PathExists(Path) {
|
|
46
|
-
try {
|
|
47
|
-
await import_fs.promises.access(Path, import_fs2.constants.F_OK);
|
|
48
|
-
return true;
|
|
49
|
-
} catch {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function IsSupportedFileExtension(Extension) {
|
|
54
|
-
let NormalizedExtension = Extension.slice(1);
|
|
55
|
-
if (NormalizedExtension.startsWith(".")) {
|
|
56
|
-
NormalizedExtension = NormalizedExtension.slice(1);
|
|
57
|
-
}
|
|
58
|
-
if (NormalizedExtension.length === 0) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
if (NormalizedExtension.includes("/") || NormalizedExtension.includes("\\") || NormalizedExtension.includes("\0")) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
if (import_os.default.platform() === "win32") {
|
|
65
|
-
const HasIllegalCharacters = /[<>:"/\\|?*\x00-\x1F]/u.test(NormalizedExtension);
|
|
66
|
-
if (HasIllegalCharacters) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
if (/[ .]$/u.test(NormalizedExtension)) {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
async function GetSafeNewPath(InPath) {
|
|
76
|
-
const DirectoryPath = (0, import_path.dirname)(InPath);
|
|
77
|
-
const Extension = (0, import_path.extname)(InPath);
|
|
78
|
-
const FileName = (0, import_path.basename)(InPath);
|
|
79
|
-
const BaseFileName = Extension === "" ? FileName : (0, import_path.basename)(InPath, Extension);
|
|
80
|
-
let CandidatePath = InPath;
|
|
81
|
-
let Index = 1;
|
|
82
|
-
while (await PathExists(CandidatePath)) {
|
|
83
|
-
const CandidateFileName = `${BaseFileName} (${Index})${Extension}`;
|
|
84
|
-
CandidatePath = (0, import_path.join)(DirectoryPath, CandidateFileName);
|
|
85
|
-
Index++;
|
|
86
|
-
}
|
|
87
|
-
return CandidatePath;
|
|
88
|
-
}
|
|
89
|
-
async function IsValidFileName(DirectoryPath, FileName, PersistNewFile = false, Extension = void 0) {
|
|
90
|
-
const ExtensionSafe = Extension !== void 0 ? Extension.startsWith(".") && IsSupportedFileExtension(Extension) ? Extension : null : "";
|
|
91
|
-
const IsExtensionImproper = ExtensionSafe === null || ExtensionSafe === "." || !FileName.endsWith(ExtensionSafe);
|
|
92
|
-
if (IsExtensionImproper) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
const FilePath = (0, import_path.join)(DirectoryPath, FileName);
|
|
96
|
-
try {
|
|
97
|
-
const ThisFileHandle = await import_fs.promises.open(FilePath, "wx");
|
|
98
|
-
await ThisFileHandle.close();
|
|
99
|
-
if (!PersistNewFile) {
|
|
100
|
-
await import_fs.promises.unlink(FilePath);
|
|
101
|
-
}
|
|
102
|
-
return true;
|
|
103
|
-
} catch {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
async function WriteTextFile(Path, Contents) {
|
|
108
|
-
await import_fs.promises.writeFile(Path, Contents, { encoding: "utf-8" });
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @file FileSystem.ts
|
|
112
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
113
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
114
|
-
* @license MIT
|
|
115
|
-
*/
|
|
116
|
-
/**
|
|
117
|
-
* @file FileSystem.Types.ts
|
|
118
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
119
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
120
|
-
* @license MIT
|
|
121
|
-
*/
|
|
122
|
-
/**
|
|
123
|
-
* @file index.ts
|
|
124
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
125
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
126
|
-
* @license MIT
|
|
127
|
-
*/
|
|
128
|
-
//# sourceMappingURL=fs.cjs.map
|
package/Distribution/fs.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
package/Distribution/fs.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
// Source/FileSystem/FileSystem.ts
|
|
2
|
-
import { basename, dirname, extname, join } from "path";
|
|
3
|
-
import { promises as Fs } from "fs";
|
|
4
|
-
import { constants as FsConstants } from "fs";
|
|
5
|
-
import os from "os";
|
|
6
|
-
async function PathExists(Path) {
|
|
7
|
-
try {
|
|
8
|
-
await Fs.access(Path, FsConstants.F_OK);
|
|
9
|
-
return true;
|
|
10
|
-
} catch {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function IsSupportedFileExtension(Extension) {
|
|
15
|
-
let NormalizedExtension = Extension.slice(1);
|
|
16
|
-
if (NormalizedExtension.startsWith(".")) {
|
|
17
|
-
NormalizedExtension = NormalizedExtension.slice(1);
|
|
18
|
-
}
|
|
19
|
-
if (NormalizedExtension.length === 0) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
if (NormalizedExtension.includes("/") || NormalizedExtension.includes("\\") || NormalizedExtension.includes("\0")) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
if (os.platform() === "win32") {
|
|
26
|
-
const HasIllegalCharacters = /[<>:"/\\|?*\x00-\x1F]/u.test(NormalizedExtension);
|
|
27
|
-
if (HasIllegalCharacters) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
if (/[ .]$/u.test(NormalizedExtension)) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
async function GetSafeNewPath(InPath) {
|
|
37
|
-
const DirectoryPath = dirname(InPath);
|
|
38
|
-
const Extension = extname(InPath);
|
|
39
|
-
const FileName = basename(InPath);
|
|
40
|
-
const BaseFileName = Extension === "" ? FileName : basename(InPath, Extension);
|
|
41
|
-
let CandidatePath = InPath;
|
|
42
|
-
let Index = 1;
|
|
43
|
-
while (await PathExists(CandidatePath)) {
|
|
44
|
-
const CandidateFileName = `${BaseFileName} (${Index})${Extension}`;
|
|
45
|
-
CandidatePath = join(DirectoryPath, CandidateFileName);
|
|
46
|
-
Index++;
|
|
47
|
-
}
|
|
48
|
-
return CandidatePath;
|
|
49
|
-
}
|
|
50
|
-
async function IsValidFileName(DirectoryPath, FileName, PersistNewFile = false, Extension = void 0) {
|
|
51
|
-
const ExtensionSafe = Extension !== void 0 ? Extension.startsWith(".") && IsSupportedFileExtension(Extension) ? Extension : null : "";
|
|
52
|
-
const IsExtensionImproper = ExtensionSafe === null || ExtensionSafe === "." || !FileName.endsWith(ExtensionSafe);
|
|
53
|
-
if (IsExtensionImproper) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
const FilePath = join(DirectoryPath, FileName);
|
|
57
|
-
try {
|
|
58
|
-
const ThisFileHandle = await Fs.open(FilePath, "wx");
|
|
59
|
-
await ThisFileHandle.close();
|
|
60
|
-
if (!PersistNewFile) {
|
|
61
|
-
await Fs.unlink(FilePath);
|
|
62
|
-
}
|
|
63
|
-
return true;
|
|
64
|
-
} catch {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
async function WriteTextFile(Path, Contents) {
|
|
69
|
-
await Fs.writeFile(Path, Contents, { encoding: "utf-8" });
|
|
70
|
-
}
|
|
71
|
-
export {
|
|
72
|
-
GetSafeNewPath,
|
|
73
|
-
IsSupportedFileExtension,
|
|
74
|
-
IsValidFileName,
|
|
75
|
-
WriteTextFile
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* @file FileSystem.ts
|
|
79
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
80
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
81
|
-
* @license MIT
|
|
82
|
-
*/
|
|
83
|
-
/**
|
|
84
|
-
* @file FileSystem.Types.ts
|
|
85
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
86
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
87
|
-
* @license MIT
|
|
88
|
-
*/
|
|
89
|
-
/**
|
|
90
|
-
* @file index.ts
|
|
91
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
92
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
93
|
-
* @license MIT
|
|
94
|
-
*/
|
|
95
|
-
//# sourceMappingURL=fs.js.map
|
package/Distribution/fs.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// Source/Functional/index.ts
|
|
21
|
-
var Functional_exports = {};
|
|
22
|
-
__export(Functional_exports, {
|
|
23
|
-
Identity: () => Identity
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Functional_exports);
|
|
26
|
-
|
|
27
|
-
// Source/Functional/Functional.ts
|
|
28
|
-
function Identity(...Arguments) {
|
|
29
|
-
return Arguments;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @file Functional.ts
|
|
33
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
34
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
35
|
-
* @license MIT
|
|
36
|
-
*/
|
|
37
|
-
/**
|
|
38
|
-
* @file Functional.Types.ts
|
|
39
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
40
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
41
|
-
* @license MIT
|
|
42
|
-
*/
|
|
43
|
-
/**
|
|
44
|
-
* @file index.ts
|
|
45
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
46
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
47
|
-
* @license MIT
|
|
48
|
-
*/
|
|
49
|
-
//# sourceMappingURL=functional.cjs.map
|