@d0paminedriven/fs 4.1.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-7QVYU63E.js +7 -0
- package/dist/chunk-EHOBCDHE.js +161 -0
- package/dist/chunk-HWF53VET.js +322 -0
- package/dist/chunk-QMN5ZCE4.js +131 -0
- package/dist/chunk-XHN56MDK.js +30 -0
- package/dist/fs/index.cjs +195 -487
- package/dist/fs/index.d.cts +8 -382
- package/dist/fs/index.d.ts +8 -382
- package/dist/fs/index.js +4 -2
- package/dist/index.cjs +328 -490
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +16 -7
- package/dist/mime/index.cjs +204 -0
- package/dist/mime/index.d.cts +238 -0
- package/dist/mime/index.d.ts +238 -0
- package/dist/mime/index.js +11 -0
- package/dist/types/index.d.cts +8 -8
- package/dist/types/index.d.ts +8 -8
- package/dist/types/index.js +0 -6
- package/dist/url/index.cjs +51 -0
- package/dist/url/index.d.cts +28 -0
- package/dist/url/index.d.ts +28 -0
- package/dist/url/index.js +8 -0
- package/dist/utils/index.cjs +152 -0
- package/dist/utils/index.d.cts +29 -0
- package/dist/utils/index.d.ts +29 -0
- package/dist/utils/index.js +8 -0
- package/package.json +29 -17
- package/dist/chunk-ELR74GDM.js +0 -774
- package/dist/chunk-I6PDZOED.js +0 -44
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RemoveFields, Unenumerate } from '../types/index.js';
|
|
2
|
+
import 'stream';
|
|
3
|
+
import 'buffer';
|
|
4
|
+
|
|
5
|
+
declare class UtilsService {
|
|
6
|
+
chunkArray<T extends number>(arr: string[], maxChunkLength: T): string[][];
|
|
7
|
+
b64ToBlob<const T extends string>(b64Data: T): Blob;
|
|
8
|
+
arrToArrOfArrs: <const T, const N extends number>({ arrToFragment, arrOfArrsAggregator, interval }: {
|
|
9
|
+
arrToFragment: T[];
|
|
10
|
+
arrOfArrsAggregator: T[][];
|
|
11
|
+
interval: N;
|
|
12
|
+
}) => Promise<T[][]>;
|
|
13
|
+
extractTuple<const T extends Record<string | number | symbol, unknown> | Enumerator<unknown>, const V extends keyof T>(obj: T, props: V): readonly [V, T[V]];
|
|
14
|
+
sort<const S extends Record<string | number | symbol, unknown> | Enumerator<unknown>, const K extends "ASC" | "DESC" | undefined>(obj: S, order?: K): S;
|
|
15
|
+
excludeTargeted: <const T extends Record<string | number | symbol, unknown> | Enumerator<unknown>, const V extends keyof T, const S extends Parameters<typeof this.sort>["1"]>(obj: T, props: V[], sort?: S) => RemoveFields<T, Unenumerate<typeof props>>;
|
|
16
|
+
includeTargeted: <const T extends Record<string | number | symbol, unknown> | Enumerator<unknown>, const V extends keyof T, const S extends Parameters<typeof this.sort>["1"]>(obj: T, props: V[], sort?: S) => Pick<T, Unenumerate<typeof props>>;
|
|
17
|
+
countsSorter: <T extends Record<string, number> | Readonly<Record<string, number>>, K extends "ASC" | "DESC" | undefined, V extends "ASC" | "DESC" | undefined>({ counter, keySort, valSort }: {
|
|
18
|
+
counter: T;
|
|
19
|
+
keySort?: K;
|
|
20
|
+
valSort?: V;
|
|
21
|
+
}) => {
|
|
22
|
+
[k: string]: number;
|
|
23
|
+
};
|
|
24
|
+
range(from: number, to: number): number[];
|
|
25
|
+
isPrimeNumber: <const T extends number>(n: T) => boolean;
|
|
26
|
+
acceptor: (num: number) => number[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { UtilsService };
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d0paminedriven/fs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "convenient fs helpers",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"source": "src/index.ts",
|
|
10
9
|
"typesVersions": {
|
|
11
10
|
"*": {
|
|
12
11
|
"*": [
|
|
@@ -16,15 +15,25 @@
|
|
|
16
15
|
"fs": [
|
|
17
16
|
"dist/fs/index.d.ts"
|
|
18
17
|
],
|
|
18
|
+
"mime": [
|
|
19
|
+
"dist/mime/index.d.ts"
|
|
20
|
+
],
|
|
19
21
|
"types": [
|
|
20
22
|
"dist/types/index.d.ts"
|
|
23
|
+
],
|
|
24
|
+
"url": [
|
|
25
|
+
"dist/url/index.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"utils": [
|
|
28
|
+
"dist/utils/index.d.ts"
|
|
21
29
|
]
|
|
22
30
|
}
|
|
23
31
|
},
|
|
24
32
|
"type": "module",
|
|
33
|
+
"source": "src/index.ts",
|
|
25
34
|
"module": "./dist/index.js",
|
|
26
35
|
"types": "./dist/index.d.ts",
|
|
27
|
-
"sideEffects":
|
|
36
|
+
"sideEffects": false,
|
|
28
37
|
"files": [
|
|
29
38
|
"dist/**/*.{js,cjs,d.ts,d.cts,css}"
|
|
30
39
|
],
|
|
@@ -32,34 +41,37 @@
|
|
|
32
41
|
".": "./dist/index.js",
|
|
33
42
|
"./*": "./dist/*.js",
|
|
34
43
|
"./fs": "./dist/fs/index.js",
|
|
35
|
-
"./
|
|
44
|
+
"./mime": "./dist/mime/index.js",
|
|
45
|
+
"./types": "./dist/types/index.js",
|
|
46
|
+
"./url": "./dist/url/index.js",
|
|
47
|
+
"./utils": "./dist/utils/index.js"
|
|
36
48
|
},
|
|
37
49
|
"dependencies": {
|
|
38
50
|
"dotenv": "^16.5.0",
|
|
39
|
-
"
|
|
51
|
+
"dotenv-expand": "^12.0.2",
|
|
52
|
+
"sharp": "^0.34.2"
|
|
40
53
|
},
|
|
41
54
|
"devDependencies": {
|
|
42
|
-
"@microsoft/api-extractor": "^7.52.
|
|
43
|
-
"@swc/core": "^1.11.
|
|
44
|
-
"@swc/wasm": "^1.11.
|
|
45
|
-
"@types/node": "^22.15.
|
|
55
|
+
"@microsoft/api-extractor": "^7.52.8",
|
|
56
|
+
"@swc/core": "^1.11.29",
|
|
57
|
+
"@swc/wasm": "^1.11.29",
|
|
58
|
+
"@types/node": "^22.15.29",
|
|
46
59
|
"chokidar": "^4.0.3",
|
|
47
60
|
"dotenv-cli": "^8.0.0",
|
|
48
|
-
"
|
|
49
|
-
"eslint": "latest",
|
|
61
|
+
"eslint": "^9.28.0",
|
|
50
62
|
"jiti": "^2.4.2",
|
|
51
|
-
"prettier": "
|
|
52
|
-
"terser": "^5.
|
|
63
|
+
"prettier": "^3.5.3",
|
|
64
|
+
"terser": "^5.40.0",
|
|
53
65
|
"tslib": "latest",
|
|
54
66
|
"tsup": "latest",
|
|
55
67
|
"tsx": "latest",
|
|
56
68
|
"typescript": "latest",
|
|
57
69
|
"typescript-eslint": "latest",
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
70
|
+
"@d0paminedriven/eslint-config": "0.1.0",
|
|
71
|
+
"@d0paminedriven/tsconfig": "0.1.0",
|
|
72
|
+
"@d0paminedriven/prettier-config": "0.1.0"
|
|
61
73
|
},
|
|
62
|
-
"prettier": "@
|
|
74
|
+
"prettier": "@d0paminedriven/prettier-config",
|
|
63
75
|
"scripts": {
|
|
64
76
|
"build": "tsup",
|
|
65
77
|
"dev": "pnpm build",
|