1n-broadutils 0.0.1

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +161 -0
  3. package/dist/browser/broadutils.d.ts +9 -0
  4. package/dist/browser/broadutils.d.ts.map +1 -0
  5. package/dist/browser/broadutils.js +3 -0
  6. package/dist/browser/broadutils.js.map +10 -0
  7. package/dist/browser/canvas/canvas.d.ts +66 -0
  8. package/dist/browser/canvas/canvas.d.ts.map +1 -0
  9. package/dist/browser/canvas/canvas.js +3 -0
  10. package/dist/browser/canvas/canvas.js.map +10 -0
  11. package/dist/browser/canvas/types.d.ts +35 -0
  12. package/dist/browser/canvas/types.d.ts.map +1 -0
  13. package/dist/browser/chunk-2h1wek3q.js +4 -0
  14. package/dist/browser/chunk-2h1wek3q.js.map +10 -0
  15. package/dist/browser/chunk-3p7c1apf.js +4 -0
  16. package/dist/browser/chunk-3p7c1apf.js.map +10 -0
  17. package/dist/browser/chunk-8r5jmymq.js +4 -0
  18. package/dist/browser/chunk-8r5jmymq.js.map +9 -0
  19. package/dist/browser/chunk-te4pbrw5.js +4 -0
  20. package/dist/browser/chunk-te4pbrw5.js.map +10 -0
  21. package/dist/browser/data/data.d.ts +11 -0
  22. package/dist/browser/data/data.d.ts.map +1 -0
  23. package/dist/browser/data/data.js +3 -0
  24. package/dist/browser/data/data.js.map +9 -0
  25. package/dist/browser/data/types.d.ts +178 -0
  26. package/dist/browser/data/types.d.ts.map +1 -0
  27. package/dist/browser/math/math.d.ts +11 -0
  28. package/dist/browser/math/math.d.ts.map +1 -0
  29. package/dist/browser/math/math.js +3 -0
  30. package/dist/browser/math/math.js.map +10 -0
  31. package/dist/browser/math/types.d.ts +134 -0
  32. package/dist/browser/math/types.d.ts.map +1 -0
  33. package/dist/browser/misc/misc.d.ts +7 -0
  34. package/dist/browser/misc/misc.d.ts.map +1 -0
  35. package/dist/browser/misc/misc.js +3 -0
  36. package/dist/browser/misc/misc.js.map +10 -0
  37. package/dist/browser/misc/types.d.ts +44 -0
  38. package/dist/browser/misc/types.d.ts.map +1 -0
  39. package/dist/browser/network/network.d.ts +4 -0
  40. package/dist/browser/network/network.d.ts.map +1 -0
  41. package/dist/browser/network/network.js +3 -0
  42. package/dist/browser/network/network.js.map +9 -0
  43. package/dist/browser/network/types.d.ts +32 -0
  44. package/dist/browser/network/types.d.ts.map +1 -0
  45. package/dist/browser/timing/timing.d.ts +7 -0
  46. package/dist/browser/timing/timing.d.ts.map +1 -0
  47. package/dist/browser/timing/timing.js +3 -0
  48. package/dist/browser/timing/timing.js.map +10 -0
  49. package/dist/browser/timing/types.d.ts +112 -0
  50. package/dist/browser/timing/types.d.ts.map +1 -0
  51. package/dist/browser/types/types.d.ts +129 -0
  52. package/dist/browser/types/types.d.ts.map +1 -0
  53. package/dist/browser/validate/types.d.ts +93 -0
  54. package/dist/browser/validate/types.d.ts.map +1 -0
  55. package/dist/browser/validate/validate.d.ts +7 -0
  56. package/dist/browser/validate/validate.d.ts.map +1 -0
  57. package/dist/browser/validate/validate.js +3 -0
  58. package/dist/browser/validate/validate.js.map +9 -0
  59. package/dist/node/broadutils.d.ts +8 -0
  60. package/dist/node/broadutils.d.ts.map +1 -0
  61. package/dist/node/broadutils.js +3 -0
  62. package/dist/node/broadutils.js.map +10 -0
  63. package/dist/node/chunk-hwenktbz.js +4 -0
  64. package/dist/node/chunk-hwenktbz.js.map +9 -0
  65. package/dist/node/data/data.d.ts +11 -0
  66. package/dist/node/data/data.d.ts.map +1 -0
  67. package/dist/node/data/data.js +3 -0
  68. package/dist/node/data/data.js.map +10 -0
  69. package/dist/node/data/types.d.ts +178 -0
  70. package/dist/node/data/types.d.ts.map +1 -0
  71. package/dist/node/filesystem/filesystem.d.ts +5 -0
  72. package/dist/node/filesystem/filesystem.d.ts.map +1 -0
  73. package/dist/node/filesystem/filesystem.js +3 -0
  74. package/dist/node/filesystem/filesystem.js.map +10 -0
  75. package/dist/node/filesystem/types.d.ts +76 -0
  76. package/dist/node/filesystem/types.d.ts.map +1 -0
  77. package/dist/node/math/math.d.ts +11 -0
  78. package/dist/node/math/math.d.ts.map +1 -0
  79. package/dist/node/math/math.js +3 -0
  80. package/dist/node/math/math.js.map +10 -0
  81. package/dist/node/math/types.d.ts +134 -0
  82. package/dist/node/math/types.d.ts.map +1 -0
  83. package/dist/node/misc/misc.d.ts +7 -0
  84. package/dist/node/misc/misc.d.ts.map +1 -0
  85. package/dist/node/misc/misc.js +3 -0
  86. package/dist/node/misc/misc.js.map +10 -0
  87. package/dist/node/misc/types.d.ts +44 -0
  88. package/dist/node/misc/types.d.ts.map +1 -0
  89. package/dist/node/timing/timing.d.ts +5 -0
  90. package/dist/node/timing/timing.d.ts.map +1 -0
  91. package/dist/node/timing/timing.js +3 -0
  92. package/dist/node/timing/timing.js.map +10 -0
  93. package/dist/node/timing/types.d.ts +70 -0
  94. package/dist/node/timing/types.d.ts.map +1 -0
  95. package/dist/node/types/types.d.ts +129 -0
  96. package/dist/node/types/types.d.ts.map +1 -0
  97. package/dist/node/validate/types.d.ts +93 -0
  98. package/dist/node/validate/types.d.ts.map +1 -0
  99. package/dist/node/validate/validate.d.ts +7 -0
  100. package/dist/node/validate/validate.d.ts.map +1 -0
  101. package/dist/node/validate/validate.js +3 -0
  102. package/dist/node/validate/validate.js.map +10 -0
  103. package/package.json +120 -0
@@ -0,0 +1,178 @@
1
+ import type { DeepFrozen, IfExtendsThenElse, Nullish, OrArray } from "../types/types.ts";
2
+ export type CloneState = {
3
+ cache: WeakMap<object, object>;
4
+ };
5
+ export type DataUrlSource = OrArray<Blob | ArrayBuffer | ArrayBufferView<ArrayBuffer>>;
6
+ export interface Base64 {
7
+ readonly alphabet: readonly [
8
+ readonly [base64ToAlpha: readonly number[], alphaToBase64: readonly number[]],
9
+ readonly [base64ToAlpha: readonly number[], alphaToBase64: readonly number[]]
10
+ ];
11
+ /**
12
+ * Encodes the given data into a base64 string.
13
+ *
14
+ * @param data The data to encode.
15
+ * @param urlSafe Whether to use URL-safe base64 encoding.
16
+ * @returns The base64-encoded string.
17
+ */
18
+ encode(data: ArrayBuffer | ArrayBufferView | string, urlSafe?: boolean): string;
19
+ /**
20
+ * Decodes the given base64 string into a Uint8Array.
21
+ *
22
+ * @param data The base64 string to decode.
23
+ * @param urlSafe Whether the string is URL-safe base64.
24
+ * @returns The decoded Uint8Array.
25
+ */
26
+ decode(data: string, urlSafe?: boolean): Uint8Array<ArrayBuffer>;
27
+ /**
28
+ * Decodes the given base64 string into a Uint8Array, ignoring invalid characters.
29
+ *
30
+ * @param data The base64 string to decode.
31
+ * @param urlSafe Whether the string is URL-safe base64.
32
+ * @returns The decoded Uint8Array.
33
+ */
34
+ decodeNonStrict(data: string, urlSafe?: boolean): Uint8Array<ArrayBuffer>;
35
+ }
36
+ export interface ConverToDataUrl {
37
+ /**
38
+ * Converts the given source to a data URL.
39
+ *
40
+ * @param source The source to convert.
41
+ * @param mimeType The MIME type of the source.
42
+ * @returns A promise resolving to the data URL.
43
+ */
44
+ (source: DataUrlSource, mimeType?: string): Promise<string>;
45
+ }
46
+ export interface ArrayUtils {
47
+ /**
48
+ * Appends the given arrays to the end of the target array and returns the target array.
49
+ *
50
+ * @param target The target array to append to.
51
+ * @param sources The arrays to append.
52
+ * @returns The target array with the sources appended to the target.
53
+ */
54
+ append: {
55
+ <T extends unknown[], A1 extends unknown[]>(target: T, ...sources: [A1]): [...T, ...A1];
56
+ <T extends unknown[], A1 extends unknown[], A2 extends unknown[]>(target: T, ...sources: [A1, A2]): [...T, ...A1, ...A2];
57
+ <T extends unknown[], A1 extends unknown[], A2 extends unknown[], A3 extends unknown[]>(target: T, ...sources: [A1, A2, A3]): [...T, ...A1, ...A2, ...A3];
58
+ <T extends unknown[], Appended>(target: T, ...sources: Appended[]): [...T, ...Appended[]];
59
+ };
60
+ /**
61
+ * Prepends the given arrays to the beginning of the target array and returns the target array.
62
+ *
63
+ * @param target The target array to prepend to.
64
+ * @param sources The arrays to prepend.
65
+ * @returns The target array with the sources prepended to the target.
66
+ */
67
+ prepend: {
68
+ <T extends unknown[], P1 extends unknown[]>(target: T, ...sources: [P1]): [...P1, ...T];
69
+ <T extends unknown[], P1 extends unknown[], P2 extends unknown[]>(target: T, ...sources: [P1, P2]): [...P1, ...P2, ...T];
70
+ <T extends unknown[], P1 extends unknown[], P2 extends unknown[], P3 extends unknown[]>(target: T, ...sources: [P1, P2, P3]): [...P1, ...P2, ...P3, ...T];
71
+ <T extends unknown[], Prepended>(target: T, ...sources: Prepended[]): [...Prepended[], ...T];
72
+ };
73
+ /**
74
+ * Compares two arrays and returns a value indicating their relative order.
75
+ *
76
+ * @param a The first array to compare.
77
+ * @param b The second array to compare.
78
+ * @param compareFn The function to use for comparing elements.
79
+ * @returns -1 if a < b, 0 if a === b, 1 if a > b.
80
+ */
81
+ compare: <T, U>(a: T[], b: U[], compareFn?: (a: T, b: U) => number) => -1 | 0 | 1;
82
+ /**
83
+ * Pads the start of the array with the given value.
84
+ *
85
+ * @param value The array to pad.
86
+ * @param length The desired length of the array.
87
+ * @param padWith The value to use for padding.
88
+ * @returns The padded array.
89
+ */
90
+ padStart: <T extends unknown[]>(value: T, length: number, padWith?: unknown) => T;
91
+ /**
92
+ * Pads the end of the array with the given value.
93
+ *
94
+ * @param value The array to pad.
95
+ * @param length The desired length of the array.
96
+ * @param padWith The value to use for padding.
97
+ * @returns The padded array.
98
+ */
99
+ padEnd: <T extends unknown[]>(value: T, length: number, padWith?: unknown) => T;
100
+ /**
101
+ * Returns a new array with the elements in reverse order.
102
+ *
103
+ * @param value The array to reverse.
104
+ * @returns A new array with the elements in reverse order.
105
+ */
106
+ toReversed: <T>(value: T[]) => T[];
107
+ }
108
+ export interface ObjectUtils {
109
+ /**
110
+ * Freezes the given object and all its nested properties.
111
+ *
112
+ * @param obj The object to freeze.
113
+ * @returns The frozen object.
114
+ */
115
+ deepFreeze<T extends object>(obj: T): DeepFrozen<T>;
116
+ /**
117
+ * Merges the given objects into a new object and returns the new object.
118
+ *
119
+ * @param sources The objects to merge.
120
+ * @returns The new merged object.
121
+ */
122
+ merge<T, U, V, W>(...sources: [T?, U?, V?, W?]): IfExtendsThenElse<T, Nullish, {}, T> & IfExtendsThenElse<U, Nullish, {}, U> & IfExtendsThenElse<V, Nullish, {}, V> & IfExtendsThenElse<W, Nullish, {}, W>;
123
+ /**
124
+ * Merges the given objects into the first object and returns the merged object.
125
+ *
126
+ * @param sources The objects to merge.
127
+ * @returns The new merged object.
128
+ */
129
+ merge(...sources: unknown[]): unknown;
130
+ /**
131
+ * Merges the given objects into the first object and returns the merged object.
132
+ *
133
+ * @param sources The objects to merge.
134
+ * @returns The merged object.
135
+ */
136
+ mergeInto<T extends object, U, V, W>(...sources: [T, U?, V?, W?]): T & IfExtendsThenElse<U, Nullish, {}, U> & IfExtendsThenElse<V, Nullish, {}, V> & IfExtendsThenElse<W, Nullish, {}, W>;
137
+ /**
138
+ * Merges the given objects into the first object and returns the merged object.
139
+ *
140
+ * @param sources The objects to merge.
141
+ * @returns The merged object.
142
+ */
143
+ mergeInto(...sources: unknown[]): unknown;
144
+ /**
145
+ * Returns a new object with the specified keys omitted.
146
+ *
147
+ * @param obj The object to omit keys from.
148
+ * @param keys The keys to omit.
149
+ * @returns A new object with the specified keys omitted.
150
+ */
151
+ omit<T extends {}, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
152
+ /**
153
+ * Returns a new object with only the specified keys.
154
+ *
155
+ * @param obj The object to pick keys from.
156
+ * @param keys The keys to pick.
157
+ * @returns A new object with only the specified keys.
158
+ */
159
+ pick<T, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
160
+ }
161
+ export interface StringUtils {
162
+ /**
163
+ * Reverses the characters in a string.
164
+ *
165
+ * @param inputStr The string to reverse.
166
+ * @returns The reversed string.
167
+ */
168
+ reverse(inputStr: string): string;
169
+ /**
170
+ * Substitutes placeholders in a string with the given values.
171
+ *
172
+ * @param inputStr The string to substitute.
173
+ * @param substitions The substitutions to make.
174
+ * @returns The string with substitutions made.
175
+ */
176
+ substitute(inputStr: string, substitions: Map<string | RegExp, string> | Record<string, string>): string;
177
+ }
178
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/node/data/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEzF,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;AAEvF,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAC1B,SAAS,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,EAAE,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;QAC7E,SAAS,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,EAAE,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;KAC9E,CAAC;IAEF;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEhF;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAEjE;;;;;;OAMG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;CAC3E;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,CAAC,MAAM,EAAE,a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,EAAE,CAAC,CAAC,GACpC,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAEvC;;;;;OAKG;IACH,SAAS,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE1C;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAErE;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC;;;;;;OAMG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACjE,MAAM,CAAC;CACX"}
@@ -0,0 +1,5 @@
1
+ import type { BetterReadStream, Which } from "./types.ts";
2
+ export declare const betterReadStream: BetterReadStream;
3
+ export declare const which: Which;
4
+ export * from "./types.ts";
5
+ //# sourceMappingURL=filesystem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../../src/node/filesystem/filesystem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAA2B,KAAK,EAAgB,MAAM,YAAY,CAAC;AAIjG,eAAO,MAAM,gBAAgB,EAAE,gBA6B9B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAsEnB,CAAC;AAEF,cAAc,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ import"../chunk-hwenktbz.js";import{accessSync as d}from"node:fs";import{open as P}from"node:fs/promises";import{delimiter as u,join as S}from"node:path";var g=process.platform==="win32",z=async function*(h,s){let r=await P(h),c=await r.stat().catch((e)=>{throw r.close(),e});try{let e=s?.offset??0,l=s?.length==null?c.size:e+Math.floor(s.length),i=s?.chunkSize??16384;if(e>=c.size)throw RangeError("Offset out of range.");if(l>c.size)l=c.size;if(l<e)throw RangeError("Invalid end offset.");while(e<l){let n=Math.min(i,l-e),f=await r.read(Buffer.allocUnsafe(n),0,n,e);e+=f.bytesRead,yield f.buffer}}finally{await r.close()}},N=Object.assign((h,s={})=>{let r=h.toLowerCase(),c=[r];g&&!r.endsWith(".exe")&&c.push(`${r}.exe`);let e=s.env??process.env,l=s.cwd!=null||!!s.includeCwd,i=s.cwd??process.cwd(),n=(e.PATH||e.Path||e.path||"").split(u);l&&n.unshift(i);for(let f of n)for(let o of c){let t=S(f,o);try{return d(t),t}catch{}}return null},{many:(h,s={})=>{let r=h.map((t)=>{return g&&!(t.endsWith(".exe")||t.endsWith(".EXE"))?[t,`${t}.exe`,`${t}.EXE`]:[t]}),c=s.env??process.env,e=s.cwd!=null||!!s.includeCwd,l=s.cwd??process.cwd(),i=(c.PATH||c.Path||c.path||"").split(u);e&&i.unshift(l);let n=Array(h.length).fill(null),f=0;for(let t of i){for(let w=0;w<r.length;w++){if(n[w]!==null)continue;for(let O of r[w]){let x=S(t,O);try{d(x),n[w]=x,f++;break}catch{}}}if(f===r.length)break}let o={};for(let t=0;t<h.length;t++)o[h[t]]=n[t]??null;return o}});export{N as which,z as betterReadStream};
2
+
3
+ //# debugId=0B9E906744FE3BED64756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["..\\..\\src\\node\\filesystem\\filesystem.ts"],
4
+ "sourcesContent": [
5
+ "import { accessSync, type PathLike } from \"node:fs\";\nimport { open } from \"node:fs/promises\";\nimport { delimiter, join } from \"node:path\";\nimport type { BetterReadStream, BetterReadStreamOptions, Which, WhichOptions } from \"./types.ts\";\n\nconst IS_WINDOWS = process.platform === \"win32\";\n\nexport const betterReadStream: BetterReadStream = async function* (\n path: PathLike,\n options?: BetterReadStreamOptions,\n) {\n const handle = await open(path);\n const stat = await handle.stat().catch((error) => {\n handle.close();\n throw error;\n });\n\n try {\n let offset = options?.offset ?? 0;\n let endOffset = options?.length == null ? stat.size : offset + Math.floor(options.length);\n let chunkSize = options?.chunkSize ?? 16384;\n\n if (offset >= stat.size) throw new RangeError(\"Offset out of range.\");\n if (endOffset > stat.size) endOffset = stat.size;\n if (endOffset < offset) throw new RangeError(\"Invalid end offset.\");\n\n while (offset < endOffset) {\n const readSize = Math.min(chunkSize, endOffset - offset);\n const chunk = await handle.read(Buffer.allocUnsafe(readSize), 0, readSize, offset);\n\n offset += chunk.bytesRead;\n yield chunk.buffer;\n }\n } finally {\n await handle.close();\n }\n};\n\nexport const which: Which = Object.assign(\n (name: string, options: WhichOptions = {}): string | null => {\n const _name = name.toLowerCase();\n const exeNames = [_name];\n IS_WINDOWS && !_name.endsWith(\".exe\") && exeNames.push(`${_name}.exe`);\n\n const env = options.env ?? process.env;\n const includeCwd = options.cwd != null || !!options.includeCwd;\n const cwd = options.cwd ?? process.cwd();\n\n const envPaths = (env.PATH || env.Path || env.path || \"\").split(delimiter);\n includeCwd && envPaths.unshift(cwd);\n\n for (const path of envPaths) {\n for (const exeName of exeNames) {\n const resolvedPath = join(path, exeName);\n try {\n accessSync(resolvedPath);\n return resolvedPath;\n } catch {}\n }\n }\n\n return null;\n },\n {\n many: <T extends string[]>(\n names: T,\n options: WhichOptions = {},\n ): { [Name in T[number]]: string | null } => {\n const exeNames = names.map((name) => {\n return IS_WINDOWS && !(name.endsWith(\".exe\") || name.endsWith(\".EXE\"))\n ? [name, `${name}.exe`, `${name}.EXE`]\n : [name];\n });\n\n const env = options.env ?? process.env;\n const includeCwd = options.cwd != null || !!options.includeCwd;\n const cwd = options.cwd ?? process.cwd();\n\n const envPaths = (env.PATH || env.Path || env.path || \"\").split(delimiter);\n includeCwd && envPaths.unshift(cwd);\n\n const exeLocations: (string | null)[] = new Array(names.length).fill(null);\n let located = 0;\n\n for (const path of envPaths) {\n for (let i = 0; i < exeNames.length; i++) {\n if (exeLocations[i]! !== null) continue;\n for (const exeName of exeNames[i]!) {\n const resolvedPath = join(path, exeName);\n try {\n accessSync(resolvedPath);\n exeLocations[i] = resolvedPath;\n located++;\n break;\n } catch {}\n }\n }\n\n if (located === exeNames.length) break;\n }\n\n const result = {} as { [Name in T[number]]: string | null };\n for (let i = 0; i < names.length; i++)\n result[names[i]! as T[number]] = exeLocations[i] ?? null;\n\n return result;\n },\n },\n);\n\nexport * from \"./types.ts\";\n"
6
+ ],
7
+ "mappings": "6BAAA,qBAAS,gBACT,eAAS,yBACT,oBAAS,UAAW,kBAGpB,IAAM,EAAa,QAAQ,WAAa,QAE3B,EAAqC,eAAgB,CAChE,EACA,EACA,CACA,IAAM,EAAS,MAAM,EAAK,CAAI,EACxB,EAAO,MAAM,EAAO,KAAK,EAAE,MAAM,CAAC,IAAU,CAEhD,MADA,EAAO,MAAM,EACP,EACP,EAED,GAAI,CACF,IAAI,EAAS,GAAS,QAAU,EAC5B,EAAY,GAAS,QAAU,KAAO,EAAK,KAAO,EAAS,KAAK,MAAM,EAAQ,MAAM,EACpF,EAAY,GAAS,WAAa,MAEtC,GAAI,GAAU,EAAK,KAAM,MAAU,WAAW,sBAAsB,EACpE,GAAI,EAAY,EAAK,KAAM,EAAY,EAAK,KAC5C,GAAI,EAAY,EAAQ,MAAU,WAAW,qBAAqB,EAElE,MAAO,EAAS,EAAW,CACzB,IAAM,EAAW,KAAK,IAAI,EAAW,EAAY,CAAM,EACjD,EAAQ,MAAM,EAAO,KAAK,OAAO,YAAY,CAAQ,EAAG,EAAG,EAAU,CAAM,EAEjF,GAAU,EAAM,UAChB,MAAM,EAAM,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S,GAAK,CAClC,IAAM,EAAe,EAAK,EAAM,CAAO,EACvC,GAAI,CACF,EAAW,CAAY,EACvB,EAAa,GAAK,EAClB,IACA,MACA,KAAM,IAIZ,GAAI,IAAY,EAAS,OAAQ,MAGnC,IAAM,EAAS,CAAC,EAChB,QAAS,EAAI,EAAG,EAAI,EAAM,OAAQ,IAChC,EAAO,EAAM,IAAoB,EAAa,IAAM,KAEtD,OAAO,EAEX,CACF",
8
+ "debugId": "0B9E906744FE3BED64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,76 @@
1
+ import type { PathLike } from "fs";
2
+ /**
3
+ * Defines the options for the `betterReadStream` function, which allows you to specify how a file
4
+ * should be read in chunks.
5
+ */
6
+ export interface BetterReadStreamOptions {
7
+ /** The starting byte position to begin reading from (default is `0`). */
8
+ offset?: number;
9
+ /** The total number of bytes to read (default is the entire file). */
10
+ length?: number;
11
+ /** The size of each chunk to read in bytes (default is `16 * 1024` or 16KB). */
12
+ chunkSize?: number;
13
+ }
14
+ export interface BetterReadStream {
15
+ /**
16
+ * Creates an asynchronous generator that reads a file in chunks, yielding each chunk as a
17
+ * `Buffer`. The function accepts a file path and an optional configuration object that allows
18
+ * you to specify the offset, length, and chunk size for reading the file. If no options are
19
+ * provided, it reads the entire file in default chunk sizes.
20
+ *
21
+ * @param path - The path to the file to be read.
22
+ * @param options - An optional configuration object that can include:
23
+ * - `offset`: The starting byte position to begin reading from (default is `0`).
24
+ * - `length`: The total number of bytes to read (default is the entire file).
25
+ * - `chunkSize`: The size of each chunk to read in bytes (default is `16 * 1024` or 16KB).
26
+ * @returns An asynchronous generator that yields each chunk of the file as a `Buffer`.
27
+ */
28
+ (path: PathLike, options?: BetterReadStreamOptions): AsyncGenerator<Buffer<ArrayBuffer>, void, unknown>;
29
+ }
30
+ /**
31
+ * Defines the options for the `which` function, which is used to locate the executable file for a
32
+ * given command name in the system's PATH. The options allow you to specify whether to include the
33
+ * current working directory in the search, provide a custom working directory, and supply a custom
34
+ * environment variable object for the search.
35
+ */
36
+ export interface WhichOptions {
37
+ /** Whether to include the current working directory in the search (default is `false`). */
38
+ includeCwd?: boolean;
39
+ /** The working directory to search in (default is `undefined`). Implies `includeCwd: true`. */
40
+ cwd?: string;
41
+ /** The environment variables to use for the search (default is the current environment). */
42
+ env?: Record<string, string>;
43
+ }
44
+ export interface Which {
45
+ /**
46
+ * Locates the executable file for a given command name in the system's PATH. The function
47
+ * accepts a command name and an optional configuration object that allows you to modify the
48
+ * search behavior. It returns the resolved path to the executable if found, or `null` if the
49
+ * executable cannot be located.
50
+ *
51
+ * @param name - The name of the command to locate (e.g., "node").
52
+ * @param options - An optional configuration object that can include:
53
+ * - `includeCwd`: Whether to include the current working directory in the search (default is `false`).
54
+ * - `cwd`: The working directory to search in (default is `undefined`). Implies `includeCwd: true`.
55
+ * - `env`: The environment variables to use for the search (default is the current environment).
56
+ * @returns The resolved path to the executable if found, or `null` if not found.
57
+ */
58
+ (name: string, options?: WhichOptions): string | null;
59
+ /**
60
+ * Locates the executable files for an array of command names in the system's PATH. The function
61
+ * accepts an array of command names and an optional configuration object that allows you to
62
+ * modify the search behavior. It returns an object mapping each command name to its resolved
63
+ * path or `null` if not found.
64
+ *
65
+ * @param names - An array of command names to locate (e.g., ["node", "npm"]).
66
+ * @param options - An optional configuration object that can include:
67
+ * - `includeCwd`: Whether to include the current working directory in the search (default is `false`).
68
+ * - `cwd`: The working directory to search in (default is `undefined`). Implies `includeCwd: true`.
69
+ * - `env`: The environment variables to use for the search (default is the current environment).
70
+ * @returns An object mapping each command name to its resolved path or `null` if not found.
71
+ */
72
+ readonly many: <T extends string[]>(names: T, options?: WhichOptions) => {
73
+ [Name in T[number]]: string | null;
74
+ };
75
+ }
76
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/node/filesystem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAEnC;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;OAYG;IACH,CACE,IAAI,EAAE,QAAQ,EACd,OAAO,CAAC,EAAE,uBAAuB,GAChC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;CACvD;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+FAA+F;IAC/F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4FAA4F;IAC5F,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,KAAK;IACpB;;;;;;;;;;;;OAYG;IACH,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;IAEtD;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,MAAM,EAAE,EAChC,KAAK,EAAE,CAAC,EACR,OAAO,CAAC,EAAE,YAAY,KACnB;SAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI;KAAE,CAAC;CAC7C"}
@@ -0,0 +1,11 @@
1
+ import type { Average, Clamp, Constrain, ConversionInterface, HCF, LCM, Max, Min } from "./types.ts";
2
+ export declare const min: Min;
3
+ export declare const max: Max;
4
+ export declare const clamp: Clamp;
5
+ export declare const constrain: Constrain;
6
+ export declare const average: Average;
7
+ export declare const hcf: HCF;
8
+ export declare const lcm: LCM;
9
+ export declare const convert: ConversionInterface;
10
+ export * from "./types.ts";
11
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../src/node/math/math.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,SAAS,EACT,mBAAmB,EACnB,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACJ,MAAM,YAAY,CAAC;AAepB,eAAO,MAAM,GAAG,EAAE,GA0BjB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,GA0BjB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAEvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,OASrB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,GAmBjB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,GAWjB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,mBA4XrB,CAAC;AAyBF,cAAc,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ import"../chunk-hwenktbz.js";var l=(e,s)=>{if(e!=null)return e;throw TypeError(s??"The provided value is null or undefined")},i=(e)=>{if(e.length===0)return e.slice();let s=e[0];if(typeof s!=="object"||s===null)return e.slice();return Symbol.iterator in s?[...s]:e.slice()},d=(...e)=>{let s=null,r=null;for(let t=0;t<e.length;++t){let n=e[t];if(typeof n==="number"){s=s??n,s=s>n?n:s;continue}if(typeof n==="bigint"){r=r??n,r=r>n?n:r;continue}throw TypeError(`Expected number or bigint, got ${typeof n}`)}if(s===null&&r===null)return Number.NEGATIVE_INFINITY;if(s===null)return r;if(r===null)return s;return l(s<r?s:r)},u=(...e)=>{let s=null,r=null;for(let t=0;t<e.length;++t){let n=e[t];if(typeof n==="number"){s=s??n,s=s>n?s:n;continue}if(typeof n==="bigint"){r=r??n,r=r>n?r:n;continue}throw TypeError(`Expected number or bigint, got ${typeof n}`)}if(s===null&&r===null)return Number.POSITIVE_INFINITY;if(s===null)return r;if(r===null)return s;return l(s>r?s:r)},f=(e,s,r)=>{if(e<s)return s;if(e>r)return r;return e},h=(e,s,r)=>{return Math.max(Math.min((e-s)/(r-s),1),0)},k=(...e)=>{if(e.length===0)return 0;let s=i(e),r=0,t=0;for(let n of s)r+=n,++t;return t===0?0:r/t},g=(...e)=>{let s=i(e),r=s.length-1;if(s.length===0)return 1;let t=0,n=0;while(t<r){if(t===s.length-1)break;let m=s[t]??1,o=s[t+1]??1;while(o>0)m%=o,n=m,m=o,o=n;s[t+1]=m,t++}return s[r]??1},b=(...e)=>{let s=i(e),r=s.length-1;if(s.length<2)return s[0]??1;for(let t=0;t<r;t++){let n=s[t]??1,m=s[t+1]??1;s[t+1]=n*m/g(n,m)}return s[r]??1},a={degrees:{gradians:(e)=>e*10/9,radians:(e)=>e*Math.PI/180,turns:(e)=>e/360},gradians:{degrees:(e)=>e*9/10,radians:(e)=>e*Math.PI/200,turns:(e)=>e/400},radians:{degrees:(e)=>e*180/Math.PI,gradians:(e)=>e*200/Math.PI,turns:(e)=>e/(2*Math.PI)},turns:{degrees:(e)=>e*360,radians:(e)=>e*2*Math.PI,gradians:(e)=>e*400},nanometers:null,nanometres:{micrometres:(e)=>e/1000,millimetres:(e)=>e/1e6,centimetres:(e)=>e/1e7,decimetres:(e)=>e/1e8,metres:(e)=>e/1e9,decametres:(e)=>e/10000000000,hectometres:(e)=>e/100000000000,kilometres:(e)=>e/1000000000000},micrometers:null,micrometres:{nanometres:(e)=>e*1000,millimetres:(e)=>e/1000,centimetres:(e)=>e/1e4,decimetres:(e)=>e/1e5,metres:(e)=>e/1e6,decametres:(e)=>e/1e7,hectometres:(e)=>e/1e8,kilometres:(e)=>e/1e9},millimeters:null,millimetres:{nanometres:(e)=>e*1e6,micrometres:(e)=>e*1000,centimetres:(e)=>e/10,decimetres:(e)=>e/100,metres:(e)=>e/1000,decametres:(e)=>e/1e4,hectometres:(e)=>e/1e5,kilometres:(e)=>e/1e6},centimeters:null,centimetres:{nanometres:(e)=>e*1e7,micrometres:(e)=>e*1e4,millimetres:(e)=>e*10,decimetres:(e)=>e/10,metres:(e)=>e/100,decametres:(e)=>e/1000,hectometres:(e)=>e/1e4,kilometres:(e)=>e/1e5},decimeters:null,decimetres:{nanometres:(e)=>e*1e8,micrometres:(e)=>e*1e5,millimetres:(e)=>e*100,centimetres:(e)=>e*10,metres:(e)=>e/10,decametres:(e)=>e/100,hectometres:(e)=>e/1000,kilometres:(e)=>e/1e4},meters:null,metres:{nanometres:(e)=>e*1e9,micrometres:(e)=>e*1e6,millimetres:(e)=>e*1000,centimetres:(e)=>e*100,decimetres:(e)=>e*10,decametres:(e)=>e/10,hectometres:(e)=>e/100,kilometres:(e)=>e/1000},decameters:null,decametres:{nanometres:(e)=>e*10000000000,micrometres:(e)=>e*1e7,millimetres:(e)=>e*1e4,centimetres:(e)=>e*1000,decimetres:(e)=>e*100,metres:(e)=>e*10,hectometres:(e)=>e/10,kilometres:(e)=>e/100},hectometers:null,hectometres:{nanometres:(e)=>e*100000000000,micrometres:(e)=>e*1e8,millimetres:(e)=>e*1e5,centimetres:(e)=>e*1e4,decimetres:(e)=>e*1000,metres:(e)=>e*100,decametres:(e)=>e*10,kilometres:(e)=>e/10},kilometers:null,kilometres:{nanometres:(e)=>e*1000000000000,micrometres:(e)=>e*1e9,millimetres:(e)=>e*1e6,centimetres:(e)=>e*1e5,decimetres:(e)=>e*1e4,metres:(e)=>e*1000,decametres:(e)=>e*100,hectometres:(e)=>e*10},nanograms:{micrograms:(e)=>e/1000,milligrams:(e)=>e/1e6,centigrams:(e)=>e/1e7,decigrams:(e)=>e/1e8,grams:(e)=>e/1e9,decagrams:(e)=>e/10000000000,hectograms:(e)=>e/100000000000,kilograms:(e)=>e/1000000000000,tonnes:(e)=>e/1000000000000000,pounds:(e)=>e/1e9*0.002204623,ounces:(e)=>e/1e9*0.03527396},micrograms:{nanograms:(e)=>e*1000,milligrams:(e)=>e/1000,centigrams:(e)=>e/1e4,decigrams:(e)=>e/1e5,grams:(e)=>e/1e6,decagrams:(e)=>e/1e7,hectograms:(e)=>e/1e8,kilograms:(e)=>e/1e9,tonnes:(e)=>e/1000000000000,pounds:(e)=>e/1e6*0.002204623,ounces:(e)=>e/1e6*0.03527396},milligrams:{nanograms:(e)=>e*1e6,micrograms:(e)=>e*1000,centigrams:(e)=>e/10,decigrams:(e)=>e/100,grams:(e)=>e/1000,decagrams:(e)=>e/1e4,hectograms:(e)=>e/1e5,kilograms:(e)=>e/1e6,tonnes:(e)=>e/1e9,pounds:(e)=>e/1000*0.002204623,ounces:(e)=>e/1000*0.03527396},centigrams:{nanograms:(e)=>e*1e7,micrograms:(e)=>e*1e4,milligrams:(e)=>e*10,decigrams:(e)=>e/10,grams:(e)=>e/100,decagrams:(e)=>e/1000,hectograms:(e)=>e/1e4,kilograms:(e)=>e/1e5,tonnes:(e)=>e/1e8,pounds:(e)=>e/100*0.002204623,ounces:(e)=>e/100*0.03527396},decigrams:{nanograms:(e)=>e*1e8,micrograms:(e)=>e*1e5,milligrams:(e)=>e*100,centigrams:(e)=>e*10,grams:(e)=>e/10,decagrams:(e)=>e/100,hectograms:(e)=>e/1000,kilograms:(e)=>e/1e4,tonnes:(e)=>e/1e7,pounds:(e)=>e/10*0.002204623,ounces:(e)=>e/10*0.03527396},grams:{nanograms:(e)=>e*1e9,micrograms:(e)=>e*1e6,milligrams:(e)=>e*1000,centigrams:(e)=>e*100,decigrams:(e)=>e*10,decagrams:(e)=>e/10,hectograms:(e)=>e/100,kilograms:(e)=>e/1000,tonnes:(e)=>e/1e6,pounds:(e)=>e*0.002204623,ounces:(e)=>e*0.03527396},decagrams:{nanograms:(e)=>e*10000000000,micrograms:(e)=>e*1e7,milligrams:(e)=>e*1e4,centigrams:(e)=>e*1000,decigrams:(e)=>e*100,grams:(e)=>e*10,hectograms:(e)=>e/10,kilograms:(e)=>e/100,tonnes:(e)=>e/1e5,pounds:(e)=>e*10*0.002204623,ounces:(e)=>e*10*0.03527396},hectograms:{nanograms:(e)=>e*100000000000,micrograms:(e)=>e*1e8,milligrams:(e)=>e*1e5,centigrams:(e)=>e*1e4,decigrams:(e)=>e*1000,grams:(e)=>e*100,decagrams:(e)=>e*10,kilograms:(e)=>e/10,tonnes:(e)=>e/1e4,pounds:(e)=>e*100*0.002204623,ounces:(e)=>e*100*0.03527396},kilograms:{nanograms:(e)=>e*1000000000000,micrograms:(e)=>e*1e9,milligrams:(e)=>e*1e6,centigrams:(e)=>e*1e5,decigrams:(e)=>e*1e4,grams:(e)=>e*1000,decagrams:(e)=>e*100,hectograms:(e)=>e*10,tonnes:(e)=>e/1000,pounds:(e)=>e*1000*0.002204623,ounces:(e)=>e*1000*0.03527396},tonnes:{nanograms:(e)=>e*1000000000000000,micrograms:(e)=>e*1000000000000,milligrams:(e)=>e*1e9,centigrams:(e)=>e*1e8,decigrams:(e)=>e*1e7,grams:(e)=>e*1e6,decagrams:(e)=>e*1e5,hectograms:(e)=>e*1e4,kilograms:(e)=>e*1000,pounds:(e)=>e*1e6*0.002204623,ounces:(e)=>e*1e6*0.03527396},pounds:{nanograms:(e)=>e/0.002204623*1e9,micrograms:(e)=>e/0.002204623*1e6,milligrams:(e)=>e/0.002204623*1000,centigrams:(e)=>e/0.002204623*100,decigrams:(e)=>e/0.002204623*10,grams:(e)=>e/0.002204623,decagrams:(e)=>e/0.002204623/10,hectograms:(e)=>e/0.002204623/100,kilograms:(e)=>e/0.002204623/1000,tonnes:(e)=>e/0.002204623/1e6,ounces:(e)=>e*16},ounces:{nanograms:(e)=>e/0.03527396*1e9,micrograms:(e)=>e/0.03527396*1e6,milligrams:(e)=>e/0.03527396*1000,centigrams:(e)=>e/0.03527396*100,decigrams:(e)=>e/0.03527396*10,grams:(e)=>e/0.03527396,decagrams:(e)=>e/0.03527396/10,hectograms:(e)=>e/0.03527396/100,kilograms:(e)=>e/0.03527396/1000,tonnes:(e)=>e/0.03527396/1e6,pounds:(e)=>e/16},nanoseconds:{microseconds:(e)=>e/1000,milliseconds:(e)=>e/1e6,seconds:(e)=>e/1e9,minutes:(e)=>e/1e9/60,hours:(e)=>e/1e9/3600,days:(e)=>e/1e9/86400,weeks:(e)=>e/1e9/604800},microseconds:{nanoseconds:(e)=>e*1000,milliseconds:(e)=>e/1000,seconds:(e)=>e/1e6,minutes:(e)=>e/1e6/60,hours:(e)=>e/1e6/3600,days:(e)=>e/1e6/86400,weeks:(e)=>e/1e6/604800},milliseconds:{nanoseconds:(e)=>e*1e6,microseconds:(e)=>e*1000,seconds:(e)=>e/1000,minutes:(e)=>e/1000/60,hours:(e)=>e/1000/3600,days:(e)=>e/1000/86400,weeks:(e)=>e/1000/604800},seconds:{nanoseconds:(e)=>e*1e9,microseconds:(e)=>e*1e6,milliseconds:(e)=>e*1000,minutes:(e)=>e/60,hours:(e)=>e/3600,days:(e)=>e/86400,weeks:(e)=>e/604800},minutes:{nanoseconds:(e)=>e*60*1e9,microseconds:(e)=>e*60*1e6,milliseconds:(e)=>e*60*1000,seconds:(e)=>e*60,hours:(e)=>e/60,days:(e)=>e/1440,weeks:(e)=>e/10080},hours:{nanoseconds:(e)=>e*3600*1e9,microseconds:(e)=>e*3600*1e6,milliseconds:(e)=>e*3600*1000,seconds:(e)=>e*3600,minutes:(e)=>e*60,days:(e)=>e/24,weeks:(e)=>e/168},days:{nanoseconds:(e)=>e*86400*1e9,microseconds:(e)=>e*86400*1e6,milliseconds:(e)=>e*86400*1000,seconds:(e)=>e*86400,minutes:(e)=>e*1440,hours:(e)=>e*24,weeks:(e)=>e/7},weeks:{nanoseconds:(e)=>e*604800*1e9,microseconds:(e)=>e*604800*1e6,milliseconds:(e)=>e*604800*1000,seconds:(e)=>e*604800,minutes:(e)=>e*10080,hours:(e)=>e*168,days:(e)=>e*7}},c=new Map([["nanometres","nanometers"],["micrometres","micrometers"],["millimetres","millimeters"],["centimetres","centimeters"],["decimetres","decimeters"],["metres","meters"],["decametres","decameters"],["hectometres","hectometers"],["kilometres","kilometers"]]);for(let e of c){let s=a[e[0]];a[e[1]]=s;for(let r of c){if(!(r[0]in s))continue;s[r[1]]=s[r[0]]}}export{d as min,u as max,b as lcm,g as hcf,a as convert,h as constrain,f as clamp,k as average};
2
+
3
+ //# debugId=2B3DA0C5306A19E264756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["..\\..\\src\\node\\math\\math.ts"],
4
+ "sourcesContent": [
5
+ "import type {\n Average,\n Clamp,\n Constrain,\n ConversionInterface,\n HCF,\n LCM,\n Max,\n Min,\n} from \"./types.ts\";\n\nconst nonNullable = <T>(value: T, message?: string): NonNullable<T> => {\n if (value != null) return value;\n throw new TypeError(message ?? \"The provided value is null or undefined\");\n};\n\nconst getArgumentValues = <T>(values: [Iterable<T>] | T[]): T[] => {\n if (values.length === 0) return values.slice();\n\n const firstValue = values[0];\n if (typeof firstValue !== \"object\" || firstValue === null) return values.slice() as T[];\n return Symbol.iterator in firstValue ? [...firstValue] : (values.slice() as T[]);\n};\n\nexport const min: Min = <T extends number | bigint>(...values: T[]): T => {\n let minNumber: number | null = null;\n let minBigInt: bigint | null = null;\n\n for (let i = 0; i < values.length; ++i) {\n const value = values[i]!;\n\n if (typeof value === \"number\") {\n minNumber = minNumber ?? value;\n minNumber = minNumber > value ? value : minNumber;\n continue;\n }\n\n if (typeof value === \"bigint\") {\n minBigInt = minBigInt ?? value;\n minBigInt = minBigInt > value ? value : minBigInt;\n continue;\n }\n\n throw new TypeError(`Expected number or bigint, got ${typeof value}`);\n }\n\n if (minNumber === null && minBigInt === null) return Number.NEGATIVE_INFINITY as T;\n if (minNumber === null) return minBigInt as T;\n if (minBigInt === null) return minNumber as T;\n return nonNullable(minNumber < minBigInt ? minNumber : minBigInt) as T;\n};\n\nexport const max: Max = <T extends number | bigint>(...values: T[]): T => {\n let maxNumber: number | null = null;\n let maxBigInt: bigint | null = null;\n\n for (let i = 0; i < values.length; ++i) {\n const value = values[i]!;\n\n if (typeof value === \"number\") {\n maxNumber = maxNumber ?? value;\n maxNumber = maxNumber > value ? maxNumber : value;\n continue;\n }\n\n if (typeof value === \"bigint\") {\n maxBigInt = maxBigInt ?? value;\n maxBigInt = maxBigInt > value ? maxBigInt : value;\n continue;\n }\n\n throw new TypeError(`Expected number or bigint, got ${typeof value}`);\n }\n\n if (maxNumber === null && maxBigInt === null) return Number.POSITIVE_INFINITY as T;\n if (maxNumber === null) return maxBigInt as T;\n if (maxBigInt === null) return maxNumber as T;\n return nonNullable(maxNumber > maxBigInt ? maxNumber : maxBigInt) as T;\n};\n\nexport const clamp: Clamp = <T extends number | bigint>(value: T, min: T, max: T): T => {\n if (value < min) return min;\n if (value > max) return max;\n return value;\n};\n\nexport const constrain: Constrain = (value, low, high) => {\n return Math.max(Math.min((value - low) / (high - low), 1), 0);\n};\n\nexport const average: Average = (...values: [Iterable<number>] | number[]) => {\n if (values.length === 0) return 0;\n\n const _values = getArgumentValues(values);\n let sum = 0;\n let length = 0;\n\n for (const value of _values) ((sum += value), ++length);\n return length === 0 ? 0 : sum / length;\n};\n\nexport const hcf: HCF = (...values: [Iterable<number>] | number[]): number => {\n const candidates = getArgumentValues(values);\n const lastIndex = candidates.length - 1;\n if (candidates.length === 0) return 1;\n\n let i = 0;\n let temp = 0;\n while (i < lastIndex) {\n if (i === candidates.length - 1) break;\n\n let a = candidates[i] ?? 1;\n let b = candidates[i + 1] ?? 1;\n while (b > 0) ((a %= b), (temp = a), (a = b), (b = temp));\n\n candidates[i + 1] = a;\n i++;\n }\n\n return candidates[lastIndex] ?? 1;\n};\n\nexport const lcm: LCM = (...values: [Iterable<number>] | number[]): number => {\n const candidates = getArgumentValues(values);\n const lastIndex = candidates.length - 1;\n if (candidates.length < 2) return candidates[0] ?? 1;\n\n for (let i = 0; i < lastIndex; i++) {\n const a = candidates[i] ?? 1;\n const b = candidates[i + 1] ?? 1;\n candidates[i + 1] = (a * b) / hcf(a, b);\n }\n return candidates[lastIndex] ?? 1;\n};\n\nexport const convert: ConversionInterface = {\n degrees: {\n gradians: (value) => (value * 10) / 9,\n radians: (value) => (value * Math.PI) / 180,\n turns: (value) => value / 360,\n },\n\n gradians: {\n degrees: (value) => (value * 9) / 10,\n radians: (value) => (value * Math.PI) / 200,\n turns: (value) => value / 400,\n },\n\n radians: {\n degrees: (value) => (value * 180) / Math.PI,\n gradians: (value) => (value * 200) / Math.PI,\n turns: (value) => value / (2 * Math.PI),\n },\n\n turns: {\n degrees: (value) => value * 360,\n radians: (value) => value * 2 * Math.PI,\n gradians: (value) => value * 400,\n },\n\n nanometers: null as unknown as ConversionInterface.Distance[\"nanometers\"],\n nanometres: {\n micrometres: (value) => value / 1e3,\n millimetres: (value) => value / 1e6,\n centimetres: (value) => value / 1e7,\n decimetres: (value) => value / 1e8,\n metres: (value) => value / 1e9,\n decametres: (value) => value / 1e10,\n hectometres: (value) => value / 1e11,\n kilometres: (value) => value / 1e12,\n } as ConversionInterface.Distance[\"nanometres\"],\n\n micrometers: null as unknown as ConversionInterface.Distance[\"micrometers\"],\n micrometres: {\n nanometres: (value) => value * 1e3,\n millimetres: (value) => value / 1e3,\n centimetres: (value) => value / 1e4,\n decimetres: (value) => value / 1e5,\n metres: (value) => value / 1e6,\n decametres: (value) => value / 1e7,\n hectometres: (value) => value / 1e8,\n kilometres: (value) => value / 1e9,\n } as ConversionInterface.Distance[\"micrometres\"],\n\n millimeters: null as unknown as ConversionInterface.Distance[\"millimeters\"],\n millimetres: {\n nanometres: (value) => value * 1e6,\n micrometres: (value) => value * 1e3,\n centimetres: (value) => value / 1e1,\n decimetres: (value) => value / 1e2,\n metres: (value) => value / 1e3,\n decametres: (value) => value / 1e4,\n hectometres: (value) => value / 1e5,\n kilometres: (value) => value / 1e6,\n } as ConversionInterface.Distance[\"millimetres\"],\n\n centimeters: null as unknown as ConversionInterface.Distance[\"centimeters\"],\n centimetres: {\n nanometres: (value) => value * 1e7,\n micrometres: (value) => value * 1e4,\n millimetres: (value) => value * 1e1,\n decimetres: (value) => value / 1e1,\n metres: (value) => value / 1e2,\n decametres: (value) => value / 1e3,\n hectometres: (value) => value / 1e4,\n kilometres: (value) => value / 1e5,\n } as ConversionInterface.Distance[\"centimetres\"],\n\n decimeters: null as unknown as ConversionInterface.Distance[\"decimeters\"],\n decimetres: {\n nanometres: (value) => value * 1e8,\n micrometres: (value) => value * 1e5,\n millimetres: (value) => value * 1e2,\n centimetres: (value) => value * 1e1,\n metres: (value) => value / 1e1,\n decametres: (value) => value / 1e2,\n hectometres: (value) => value / 1e3,\n kilometres: (value) => value / 1e4,\n } as ConversionInterface.Distance[\"decimetres\"],\n\n meters: null as unknown as ConversionInterface.Distance[\"meters\"],\n metres: {\n nanometres: (value) => value * 1e9,\n micrometres: (value) => value * 1e6,\n millimetres: (value) => value * 1e3,\n centimetres: (value) => value * 1e2,\n decimetres: (value) => value * 1e1,\n decametres: (value) => value / 1e1,\n hectometres: (value) => value / 1e2,\n kilometres: (value) => value / 1e3,\n } as ConversionInterface.Distance[\"metres\"],\n\n decameters: null as unknown as ConversionInterface.Distance[\"decameters\"],\n decametres: {\n nanometres: (value) => value * 1e10,\n micrometres: (value) => value * 1e7,\n millimetres: (value) => value * 1e4,\n centimetres: (value) => value * 1e3,\n decimetres: (value) => value * 1e2,\n metres: (value) => value * 1e1,\n hectometres: (value) => value / 1e1,\n kilometres: (value) => value / 1e2,\n } as ConversionInterface.Distance[\"decametres\"],\n\n hectometers: null as unknown as ConversionInterface.Distance[\"hectometers\"],\n hectometres: {\n nanometres: (value) => value * 1e11,\n micrometres: (value) => value * 1e8,\n millimetres: (value) => value * 1e5,\n centimetres: (value) => value * 1e4,\n decimetres: (value) => value * 1e3,\n metres: (value) => value * 1e2,\n decametres: (value) => value * 1e1,\n kilometres: (value) => value / 1e1,\n } as ConversionInterface.Distance[\"hectometres\"],\n\n kilometers: null as unknown as ConversionInterface.Distance[\"kilometers\"],\n kilometres: {\n nanometres: (value) => value * 1e12,\n micrometres: (value) => value * 1e9,\n millimetres: (value) => value * 1e6,\n centimetres: (value) => value * 1e5,\n decimetres: (value) => value * 1e4,\n metres: (value) => value * 1e3,\n decametres: (value) => value * 1e2,\n hectometres: (value) => value * 1e1,\n } as ConversionInterface.Distance[\"kilometres\"],\n\n nanograms: {\n micrograms: (value) => value / 1e3,\n milligrams: (value) => value / 1e6,\n centigrams: (value) => value / 1e7,\n decigrams: (value) => value / 1e8,\n grams: (value) => value / 1e9,\n decagrams: (value) => value / 1e10,\n hectograms: (value) => value / 1e11,\n kilograms: (value) => value / 1e12,\n tonnes: (value) => value / 1e15,\n pounds: (value) => (value / 1e9) * 0.002204623,\n ounces: (value) => (value / 1e9) * 0.03527396,\n },\n\n micrograms: {\n nanograms: (value) => value * 1e3,\n milligrams: (value) => value / 1e3,\n centigrams: (value) => value / 1e4,\n decigrams: (value) => value / 1e5,\n grams: (value) => value / 1e6,\n decagrams: (value) => value / 1e7,\n hectograms: (value) => value / 1e8,\n kilograms: (value) => value / 1e9,\n tonnes: (value) => value / 1e12,\n pounds: (value) => (value / 1e6) * 0.002204623,\n ounces: (value) => (value / 1e6) * 0.03527396,\n },\n\n milligrams: {\n nanograms: (value) => value * 1e6,\n micrograms: (value) => value * 1e3,\n centigrams: (value) => value / 1e1,\n decigrams: (value) => value / 1e2,\n grams: (value) => value / 1e3,\n decagrams: (value) => value / 1e4,\n hectograms: (value) => value / 1e5,\n kilograms: (value) => value / 1e6,\n tonnes: (value) => value / 1e9,\n pounds: (value) => (value / 1e3) * 0.002204623,\n ounces: (value) => (value / 1e3) * 0.03527396,\n },\n\n centigrams: {\n nanograms: (value) => value * 1e7,\n micrograms: (value) => value * 1e4,\n milligrams: (value) => value * 1e1,\n decigrams: (value) => value / 1e1,\n grams: (value) => value / 1e2,\n decagrams: (value) => value / 1e3,\n hectograms: (value) => value / 1e4,\n kilograms: (value) => value / 1e5,\n tonnes: (value) => value / 1e8,\n pounds: (value) => (value / 1e2) * 0.002204623,\n ounces: (value) => (value / 1e2) * 0.03527396,\n },\n\n decigrams: {\n nanograms: (value) => value * 1e8,\n micrograms: (value) => value * 1e5,\n milligrams: (value) => value * 1e2,\n centigrams: (value) => value * 1e1,\n grams: (value) => value / 1e1,\n decagrams: (value) => value / 1e2,\n hectograms: (value) => value / 1e3,\n kilograms: (value) => value / 1e4,\n tonnes: (value) => value / 1e7,\n pounds: (value) => (value / 1e1) * 0.002204623,\n ounces: (value) => (value / 1e1) * 0.03527396,\n },\n\n grams: {\n nanograms: (value) => value * 1e9,\n micrograms: (value) => value * 1e6,\n milligrams: (value) => value * 1e3,\n centigrams: (value) => value * 1e2,\n decigrams: (value) => value * 1e1,\n decagrams: (value) => value / 1e1,\n hectograms: (value) => value / 1e2,\n kilograms: (value) => value / 1e3,\n tonnes: (value) => value / 1e6,\n pounds: (value) => value * 0.002204623,\n ounces: (value) => value * 0.03527396,\n },\n\n decagrams: {\n nanograms: (value) => value * 1e10,\n micrograms: (value) => value * 1e7,\n milligrams: (value) => value * 1e4,\n centigrams: (value) => value * 1e3,\n decigrams: (value) => value * 1e2,\n grams: (value) => value * 1e1,\n hectograms: (value) => value / 1e1,\n kilograms: (value) => value / 1e2,\n tonnes: (value) => value / 1e5,\n pounds: (value) => value * 1e1 * 0.002204623,\n ounces: (value) => value * 1e1 * 0.03527396,\n },\n\n hectograms: {\n nanograms: (value) => value * 1e11,\n micrograms: (value) => value * 1e8,\n milligrams: (value) => value * 1e5,\n centigrams: (value) => value * 1e4,\n decigrams: (value) => value * 1e3,\n grams: (value) => value * 1e2,\n decagrams: (value) => value * 1e1,\n kilograms: (value) => value / 1e1,\n tonnes: (value) => value / 1e4,\n pounds: (value) => value * 1e2 * 0.002204623,\n ounces: (value) => value * 1e2 * 0.03527396,\n },\n\n kilograms: {\n nanograms: (value) => value * 1e12,\n micrograms: (value) => value * 1e9,\n milligrams: (value) => value * 1e6,\n centigrams: (value) => value * 1e5,\n decigrams: (value) => value * 1e4,\n grams: (value) => value * 1e3,\n decagrams: (value) => value * 1e2,\n hectograms: (value) => value * 1e1,\n tonnes: (value) => value / 1e3,\n pounds: (value) => value * 1e3 * 0.002204623,\n ounces: (value) => value * 1e3 * 0.03527396,\n },\n\n tonnes: {\n nanograms: (value) => value * 1e15,\n micrograms: (value) => value * 1e12,\n milligrams: (value) => value * 1e9,\n centigrams: (value) => value * 1e8,\n decigrams: (value) => value * 1e7,\n grams: (value) => value * 1e6,\n decagrams: (value) => value * 1e5,\n hectograms: (value) => value * 1e4,\n kilograms: (value) => value * 1e3,\n pounds: (value) => value * 1e6 * 0.002204623,\n ounces: (value) => value * 1e6 * 0.03527396,\n },\n\n pounds: {\n nanograms: (value) => (value / 0.002204623) * 1e9,\n micrograms: (value) => (value / 0.002204623) * 1e6,\n milligrams: (value) => (value / 0.002204623) * 1e3,\n centigrams: (value) => (value / 0.002204623) * 1e2,\n decigrams: (value) => (value / 0.002204623) * 1e1,\n grams: (value) => value / 0.002204623,\n decagrams: (value) => value / 0.002204623 / 1e1,\n hectograms: (value) => value / 0.002204623 / 1e2,\n kilograms: (value) => value / 0.002204623 / 1e3,\n tonnes: (value) => value / 0.002204623 / 1e6,\n ounces: (value) => value * 16,\n },\n\n ounces: {\n nanograms: (value) => (value / 0.03527396) * 1e9,\n micrograms: (value) => (value / 0.03527396) * 1e6,\n milligrams: (value) => (value / 0.03527396) * 1e3,\n centigrams: (value) => (value / 0.03527396) * 1e2,\n decigrams: (value) => (value / 0.03527396) * 1e1,\n grams: (value) => value / 0.03527396,\n decagrams: (value) => value / 0.03527396 / 1e1,\n hectograms: (value) => value / 0.03527396 / 1e2,\n kilograms: (value) => value / 0.03527396 / 1e3,\n tonnes: (value) => value / 0.03527396 / 1e6,\n pounds: (value) => value / 16,\n },\n\n nanoseconds: {\n microseconds: (value) => value / 1e3,\n milliseconds: (value) => value / 1e6,\n seconds: (value) => value / 1e9,\n minutes: (value) => value / 1e9 / 60,\n hours: (value) => value / 1e9 / 3600,\n days: (value) => value / 1e9 / 86400,\n weeks: (value) => value / 1e9 / 604800,\n },\n\n microseconds: {\n nanoseconds: (value) => value * 1e3,\n milliseconds: (value) => value / 1e3,\n seconds: (value) => value / 1e6,\n minutes: (value) => value / 1e6 / 60,\n hours: (value) => value / 1e6 / 3600,\n days: (value) => value / 1e6 / 86400,\n weeks: (value) => value / 1e6 / 604800,\n },\n\n milliseconds: {\n nanoseconds: (value) => value * 1e6,\n microseconds: (value) => value * 1e3,\n seconds: (value) => value / 1e3,\n minutes: (value) => value / 1e3 / 60,\n hours: (value) => value / 1e3 / 3600,\n days: (value) => value / 1e3 / 86400,\n weeks: (value) => value / 1e3 / 604800,\n },\n\n seconds: {\n nanoseconds: (value) => value * 1e9,\n microseconds: (value) => value * 1e6,\n milliseconds: (value) => value * 1e3,\n minutes: (value) => value / 60,\n hours: (value) => value / 3600,\n days: (value) => value / 86400,\n weeks: (value) => value / 604800,\n },\n\n minutes: {\n nanoseconds: (value) => value * 60 * 1e9,\n microseconds: (value) => value * 60 * 1e6,\n milliseconds: (value) => value * 60 * 1e3,\n seconds: (value) => value * 60,\n hours: (value) => value / 60,\n days: (value) => value / 1440,\n weeks: (value) => value / 10080,\n },\n\n hours: {\n nanoseconds: (value) => value * 3600 * 1e9,\n microseconds: (value) => value * 3600 * 1e6,\n milliseconds: (value) => value * 3600 * 1e3,\n seconds: (value) => value * 3600,\n minutes: (value) => value * 60,\n days: (value) => value / 24,\n weeks: (value) => value / 168,\n },\n\n days: {\n nanoseconds: (value) => value * 86400 * 1e9,\n microseconds: (value) => value * 86400 * 1e6,\n milliseconds: (value) => value * 86400 * 1e3,\n seconds: (value) => value * 86400,\n minutes: (value) => value * 1440,\n hours: (value) => value * 24,\n weeks: (value) => value / 7,\n },\n\n weeks: {\n nanoseconds: (value) => value * 604800 * 1e9,\n microseconds: (value) => value * 604800 * 1e6,\n milliseconds: (value) => value * 604800 * 1e3,\n seconds: (value) => value * 604800,\n minutes: (value) => value * 10080,\n hours: (value) => value * 168,\n days: (value) => value * 7,\n },\n};\n\nconst distanceUnitPairs: Map<string, string> = new Map([\n [\"nanometres\", \"nanometers\"],\n [\"micrometres\", \"micrometers\"],\n [\"millimetres\", \"millimeters\"],\n [\"centimetres\", \"centimeters\"],\n [\"decimetres\", \"decimeters\"],\n [\"metres\", \"meters\"],\n [\"decametres\", \"decameters\"],\n [\"hectometres\", \"hectometers\"],\n [\"kilometres\", \"kilometers\"],\n]);\n\nfor (const pair of distanceUnitPairs) {\n const interfaceObject = convert[pair[0] as keyof ConversionInterface];\n // @ts-expect-error\n convert[pair[1]] = interfaceObject;\n for (const pair2 of distanceUnitPairs) {\n if (!(pair2[0] in interfaceObject)) continue;\n // @ts-expect-error\n interfaceObject[pair2[1]] = interfaceObject[pair2[0]];\n }\n}\n\nexport * from \"./types.ts\";\n"
6
+ ],
7
+ "mappings": "6BAWA,IAAM,EAAc,CAAI,EAAU,IAAqC,CACrE,GAAI,GAAS,KAAM,OAAO,EAC1B,MAAU,UAAU,GAAW,yCAAyC,GAGpE,EAAoB,CAAI,IAAqC,CACjE,GAAI,EAAO,SAAW,EAAG,OAAO,EAAO,MAAM,EAE7C,IAAM,EAAa,EAAO,GAC1B,GAAI,OAAO,IAAe,UAAY,IAAe,KAAM,OAAO,EAAO,MAAM,EAC/E,OAAO,OAAO,YAAY,EAAa,CAAC,GAAG,CAAU,EAAK,EAAO,MAAM,GAG5D,EAAW,IAA+B,IAAmB,CACxE,IAAI,EAA2B,KAC3B,EAA2B,KAE/B,QAAS,EAAI,EAAG,EAAI,EAAO,OAAQ,EAAE,EAAG,CACtC,IAAM,EAAQ,EAAO,GAErB,GAAI,OAAO,IAAU,SAAU,CAC7B,EAAY,GAAa,EACzB,EAAY,EAAY,EAAQ,EAAQ,EACxC,SAGF,GAAI,OAAO,IAAU,SAAU,CAC7B,EAAY,GAAa,EACzB,EAAY,EAAY,EAAQ,EAAQ,EACxC,SAGF,MAAU,UAAU,kCAAkC,OAAO,GAAO,EAGtE,GAAI,IAAc,MAAQ,IAAc,KAAM,OAAO,OAAO,kBAC5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AQ,GACzB,MAAO,CAAC,IAAU,EAAQ,GAC5B,EAEA,KAAM,CACJ,YAAa,CAAC,IAAU,EAAQ,MAAQ,IACxC,aAAc,CAAC,IAAU,EAAQ,MAAQ,IACzC,aAAc,CAAC,IAAU,EAAQ,MAAQ,KACzC,QAAS,CAAC,IAAU,EAAQ,MAC5B,QAAS,CAAC,IAAU,EAAQ,KAC5B,MAAO,CAAC,IAAU,EAAQ,GAC1B,MAAO,CAAC,IAAU,EAAQ,CAC5B,EAEA,MAAO,CACL,YAAa,CAAC,IAAU,EAAQ,OAAS,IACzC,aAAc,CAAC,IAAU,EAAQ,OAAS,IAC1C,aAAc,CAAC,IAAU,EAAQ,OAAS,KAC1C,QAAS,CAAC,IAAU,EAAQ,OAC5B,QAAS,CAAC,IAAU,EAAQ,MAC5B,MAAO,CAAC,IAAU,EAAQ,IAC1B,KAAM,CAAC,IAAU,EAAQ,CAC3B,CACF,EAEM,EAAyC,IAAI,IAAI,CACrD,CAAC,aAAc,YAAY,EAC3B,CAAC,cAAe,aAAa,EAC7B,CAAC,cAAe,aAAa,EAC7B,CAAC,cAAe,aAAa,EAC7B,CAAC,aAAc,YAAY,EAC3B,CAAC,SAAU,QAAQ,EACnB,CAAC,aAAc,YAAY,EAC3B,CAAC,cAAe,aAAa,EAC7B,CAAC,aAAc,YAAY,CAC7B,CAAC,EAED,QAAW,KAAQ,EAAmB,CACpC,IAAM,EAAkB,EAAQ,EAAK,IAErC,EAAQ,EAAK,IAAM,EACnB,QAAW,KAAS,EAAmB,CACrC,GAAI,EAAE,EAAM,KAAM,GAAkB,SAEpC,EAAgB,EAAM,IAAM,EAAgB,EAAM",
8
+ "debugId": "2B3DA0C5306A19E264756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,134 @@
1
+ import type { StringSplit } from "../types/types.ts";
2
+ export interface Average {
3
+ /**
4
+ * Calculates the average (arithmetic mean) of the provided values. The function can accept
5
+ * either an iterable of numbers or a list of individual number arguments. If no values are
6
+ * provided, it returns `0`.
7
+ *
8
+ * @param values - An iterable of numbers or a list of individual number arguments.
9
+ * @returns The average of the provided values, or `0` if no values are given.
10
+ */
11
+ (...values: [Iterable<number>] | number[]): number;
12
+ }
13
+ export interface Min {
14
+ /**
15
+ * Determines the minimum value from a set of provided numbers. The function can accept
16
+ * either an iterable of numbers or a list of individual number arguments. If no values are
17
+ * provided, it returns `undefined`.
18
+ *
19
+ * @param values - An iterable of numbers or a list of individual number arguments.
20
+ * @returns The minimum value from the provided numbers, or `Number.NEGATIVE_INFINITY` if no values are given.
21
+ */
22
+ (...values: number[]): number;
23
+ (...values: bigint[]): bigint;
24
+ (...values: (number | bigint)[]): number | bigint;
25
+ }
26
+ export interface Max {
27
+ /**
28
+ * Determines the maximum value from a set of provided numbers. The function can accept
29
+ * either an iterable of numbers or a list of individual number arguments. If no values are
30
+ * provided, it returns `undefined`.
31
+ *
32
+ * @param values - An iterable of numbers or a list of individual number arguments.
33
+ * @returns The maximum value from the provided numbers, or `Number.POSITIVE_INFINITY` if no values are given.
34
+ */
35
+ (...values: number[]): number;
36
+ (...values: bigint[]): bigint;
37
+ (...values: (number | bigint)[]): number | bigint;
38
+ }
39
+ export interface Clamp {
40
+ /**
41
+ * Clamps a value between a minimum and maximum range. If the value is less than the minimum,
42
+ * it returns the minimum. If the value is greater than the maximum, it returns the maximum.
43
+ * Otherwise, it returns the value itself.
44
+ *
45
+ * @param value - The number to be clamped.
46
+ * @param min - The minimum value of the range.
47
+ * @param max - The maximum value of the range.
48
+ * @returns The clamped value, which will be between `min` and `max`.
49
+ */
50
+ (value: number, min: number, max: number): number;
51
+ (value: bigint, min: bigint, max: bigint): bigint;
52
+ }
53
+ export interface Constrain {
54
+ /**
55
+ * Normalizes a value to a range between 0 and 1 based on a specified minimum and maximum. If the
56
+ * value is less than the minimum, it returns `0`. If the value is greater than the maximum, it
57
+ * returns `1`. Otherwise, it returns a normalized value between `0` and `1`.
58
+ *
59
+ * @param value - The number to be constrained.
60
+ * @param low - The minimum value of the range.
61
+ * @param high - The maximum value of the range.
62
+ * @returns A normalized value between `0` and `1`, based on the position of `value` within the
63
+ * range defined by `low` and `high`.
64
+ */
65
+ (value: number, low: number, high: number): number;
66
+ }
67
+ export interface LCM {
68
+ /**
69
+ * Calculates the least common multiple (LCM) of a set of provided numbers. The function can
70
+ * accept either an iterable of numbers or a list of individual number arguments. If no values
71
+ * are provided, it returns `1`.
72
+ *
73
+ * @param values - An iterable of numbers or a list of individual number arguments.
74
+ * @returns The least common multiple of the provided numbers, or `1` if no values are given.
75
+ */
76
+ (...values: [Iterable<number>] | number[]): number;
77
+ }
78
+ export interface HCF {
79
+ /**
80
+ * Calculates the highest common factor (HCF) of a set of provided numbers. The function can
81
+ * accept either an iterable of numbers or a list of individual number arguments. If no values
82
+ * are provided, it returns `1`.
83
+ *
84
+ * @param values - An iterable of numbers or a list of individual number arguments.
85
+ * @returns The highest common factor of the provided numbers, or `1` if no values are given.
86
+ */
87
+ (...values: [Iterable<number>] | number[]): number;
88
+ }
89
+ type __FullDistanceConversionInterface = {
90
+ [Unit in DistanceUnit]: (value: number) => number;
91
+ };
92
+ declare namespace DistanceUnit {
93
+ type Prefix = "nano" | "micro" | "milli" | "centi" | "deci" | "" | "deca" | "hecto" | "kilo";
94
+ type Suffix = "meters" | "metres";
95
+ }
96
+ export type AngleUnit = "degrees" | "gradians" | "radians" | "turns";
97
+ export type DistanceUnit = `${DistanceUnit.Prefix}${DistanceUnit.Suffix}`;
98
+ export type MassUnit = "nanograms" | "micrograms" | "milligrams" | "centigrams" | "decigrams" | "grams" | "decagrams" | "hectograms" | "kilograms" | "tonnes" | "pounds" | "ounces";
99
+ export type TimeUnit = "nanoseconds" | "microseconds" | "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks";
100
+ type AngleConversionInterface = {
101
+ [Source in AngleUnit]: {
102
+ [Target in Exclude<AngleUnit, Source>]: (value: number) => number;
103
+ };
104
+ };
105
+ type DistanceConversionInterface = {
106
+ [U in DistanceUnit]: Omit<__FullDistanceConversionInterface, `${StringSplit<U, DistanceUnit.Suffix>[0]}${DistanceUnit.Suffix}`>;
107
+ };
108
+ type MassConversionInterface = {
109
+ [Source in MassUnit]: {
110
+ [Target in Exclude<MassUnit, Source>]: (value: number) => number;
111
+ };
112
+ };
113
+ type TimeConversionInterface = {
114
+ [Source in TimeUnit]: {
115
+ [Target in Exclude<TimeUnit, Source>]: (value: number) => number;
116
+ };
117
+ };
118
+ /**
119
+ * The `ConversionInterface` is a comprehensive interface that encompasses conversion functions for
120
+ * angles, distances, masses, and time units. It extends the specific conversion interfaces for
121
+ * each category, allowing for a structured and organized way to access various unit conversion
122
+ * functions. Each conversion function takes a numerical value as input and returns the converted
123
+ * value in the target unit.
124
+ */
125
+ export interface ConversionInterface extends AngleConversionInterface, DistanceConversionInterface, MassConversionInterface, TimeConversionInterface {
126
+ }
127
+ export declare namespace ConversionInterface {
128
+ type Angle = AngleConversionInterface;
129
+ type Distance = DistanceConversionInterface;
130
+ type Mass = MassConversionInterface;
131
+ type Time = TimeConversionInterface;
132
+ }
133
+ export {};
134
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/node/math/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,OAAO;IACtB;;;;;;;OAOG;IACH,CAAC,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;CACpD;AAED,MAAM,WAAW,GAAG;IAClB;;;;;;;OAOG;IACH,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC9B,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC9B,CAAC,GAAG,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GA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CACF,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,mBACf,SACE,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB;CAAG;AAE9B,yBAAiB,mBAAmB,CAAC;IACnC,KAAY,KAAK,GAAG,wBAAwB,CAAC;IAC7C,KAAY,QAAQ,GAAG,2BAA2B,CAAC;IACnD,KAAY,IAAI,GAAG,uBAAuB,CAAC;IAC3C,KAAY,IAAI,GAAG,uBAAuB,CAAC;CAC5C"}
@@ -0,0 +1,7 @@
1
+ import type { CreateDeferred } from "./types.ts";
2
+ export declare const noop: (...args: unknown[]) => null;
3
+ export declare const createDeferred: CreateDeferred;
4
+ export declare const allowGC: (value: any) => null;
5
+ export declare const preventGC: (value: any) => null;
6
+ export * from "./types.ts";
7
+ //# sourceMappingURL=misc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../src/node/misc/misc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,YAAY,CAAC;AAEpE,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,OAAO,EAAE,KAAG,IAAY,CAAC;AAEvD,eAAO,MAAM,cAAc,EAAE,cAgB5B,CAAC;AAgBF,eAAO,MAAM,OAAO,sBAAkB,CAAC;AACvC,eAAO,MAAM,SAAS,sBAAoB,CAAC;AAE3C,cAAc,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ import"../chunk-hwenktbz.js";var s=(...r)=>null,D=async()=>{let r={promise:{},resolve:s,reject:s};return await new Promise((e)=>{r.promise=new Promise((p,G)=>{r.resolve=p,r.reject=G,e(null)})}),r},C=(()=>{let r=Symbol("preserved"),e=new Set;return Object.defineProperty(globalThis,r,{value:e,enumerable:!1}),{allowGC:(p)=>(e.delete(p),null),preventGC:(p)=>(e.add(p),null)}})(),m=C.allowGC,x=C.preventGC;export{x as preventGC,s as noop,D as createDeferred,m as allowGC};
2
+
3
+ //# debugId=04103E2D1CD3463964756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["..\\..\\src\\node\\misc\\misc.ts"],
4
+ "sourcesContent": [
5
+ "import type { CreateDeferred, Deferred, GCUtils } from \"./types.ts\";\n\nexport const noop = (...args: unknown[]): null => null;\n\nexport const createDeferred: CreateDeferred = async <T>(): Promise<Deferred<T>> => {\n const deferred: Deferred<T> = {\n promise: {} as Promise<T>,\n resolve: noop,\n reject: noop,\n };\n\n await new Promise((rresolved) => {\n deferred.promise = new Promise<T>((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n rresolved(null);\n });\n });\n\n return deferred;\n};\n\nconst gcUtils: GCUtils = (() => {\n const preserveSymbol = Symbol(\"preserved\");\n const preserveSet: Set<any> = new Set();\n Object.defineProperty(globalThis, preserveSymbol, {\n value: preserveSet,\n enumerable: false,\n });\n\n return {\n allowGC: (value: any) => (preserveSet.delete(value), null),\n preventGC: (value: any) => (preserveSet.add(value), null),\n };\n})();\n\nexport const allowGC = gcUtils.allowGC;\nexport const preventGC = gcUtils.preventGC;\n\nexport * from \"./types.ts\";\n"
6
+ ],
7
+ "mappings": "6BAEO,IAAM,EAAO,IAAI,IAA0B,KAErC,EAAiC,SAAqC,CACjF,IAAM,EAAwB,CAC5B,QAAS,CAAC,EACV,QAAS,EACT,OAAQ,CACV,EAUA,OARA,MAAM,IAAI,QAAQ,CAAC,IAAc,CAC/B,EAAS,QAAU,IAAI,QAAW,CAAC,EAAS,IAAW,CACrD,EAAS,QAAU,EACnB,EAAS,OAAS,EAClB,EAAU,IAAI,EACf,EACF,EAEM,GAGH,GAAoB,IAAM,CAC9B,IAAM,EAAiB,OAAO,WAAW,EACnC,EAAwB,IAAI,IAMlC,OALA,OAAO,eAAe,WAAY,EAAgB,CAChD,MAAO,EACP,WAAY,EACd,CAAC,EAEM,CACL,QAAS,CAAC,KAAgB,EAAY,OAAO,CAAK,EAAG,MACrD,UAAW,CAAC,KAAgB,EAAY,IAAI,CAAK,EAAG,KACtD,IACC,EAEU,EAAU,EAAQ,QAClB,EAAY,EAAQ",
8
+ "debugId": "04103E2D1CD3463964756E2164756E21",
9
+ "names": []
10
+ }