@awesomeness-js/utils 1.1.22 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +32 -0
- package/package.json +1 -1
- package/schemas/schema1.js +1 -8
- package/schemas/schema2.js +1 -8
- package/src/random/array.js +46 -0
- package/src/random/arrayValue.js +5 -0
- package/src/random/boolean.js +5 -0
- package/src/random/integer.js +8 -0
- package/src/random/number.js +17 -0
- package/src/random/object.js +46 -0
- package/src/random/string.js +10 -0
- package/src/random/timestamp.js +15 -0
- package/src/random/uuid.js +7 -0
- package/src/utils/clean.js +66 -73
- package/test/js/abc.test.js +1 -3
- package/tests/clean/array.test.js +1 -3
- package/tests/clean/boolean.test.js +1 -3
- package/tests/clean/integer.test.js +1 -3
- package/tests/clean/number.test.js +1 -3
- package/tests/clean/object.test.js +3 -4
- package/tests/clean/string.test.js +1 -3
- package/tests/clean/timestamp.test.js +1 -3
- package/tests/clean/uuid.test.js +1 -3
- package/tests/collectImports.test.js +1 -3
- package/tests/combineFiles.test.js +1 -3
- package/tests/convertBytes.test.js +1 -3
- package/tests/env.test.js +1 -3
- package/tests/example.test.js +1 -3
- package/tests/fileList.test.js +1 -3
- package/tests/hash-and-encrypt.test.js +1 -3
- package/tests/md5.test.js +1 -3
- package/tests/namedExports.test.js +1 -3
- package/tests/random.test.js +110 -0
- package/tests/uuid.test.js +1 -3
- package/tests/validateSchema.test.js +1 -3
- package/types/build.d.ts +10 -10
- package/types/clean/array.d.ts +6 -6
- package/types/clean/boolean.d.ts +3 -3
- package/types/clean/buffer.d.ts +12 -12
- package/types/clean/custom.d.ts +4 -4
- package/types/clean/file.d.ts +11 -11
- package/types/clean/integer.d.ts +6 -6
- package/types/clean/number.d.ts +8 -8
- package/types/clean/object.d.ts +6 -6
- package/types/clean/string.d.ts +10 -10
- package/types/clean/timestamp.d.ts +5 -5
- package/types/clean/uuid.d.ts +3 -3
- package/types/collectImports.d.ts +6 -6
- package/types/combineFiles.d.ts +8 -8
- package/types/convertBytes.d.ts +8 -8
- package/types/decrypt.d.ts +1 -1
- package/types/each.d.ts +10 -10
- package/types/eachAsync.d.ts +1 -1
- package/types/encrypt.d.ts +5 -5
- package/types/getAllFiles.d.ts +6 -6
- package/types/index.d.ts +150 -150
- package/types/isUUID.d.ts +1 -1
- package/types/md5.d.ts +2 -2
- package/types/password/check.d.ts +1 -1
- package/types/password/hash.d.ts +1 -1
- package/types/setLocalEnvs.d.ts +2 -2
- package/types/shouldIgnore.d.ts +1 -1
- package/types/thingType.d.ts +2 -2
- package/types/toPennies.d.ts +1 -1
- package/types/utils/buildExportsTree.d.ts +4 -4
- package/types/utils/buildFileDataList.d.ts +12 -12
- package/types/utils/clean.d.ts +27 -27
- package/types/utils/extractJSDocComment.d.ts +1 -1
- package/types/utils/generateFile.d.ts +8 -8
- package/types/utils/generateFlatExportLines.d.ts +7 -7
- package/types/utils/generateImportStatements.d.ts +5 -5
- package/types/utils/generateNamedExports.d.ts +7 -7
- package/types/utils/generateNamespaceCode.d.ts +7 -7
- package/types/utils/generateNamespaceExportLines.d.ts +6 -6
- package/types/uuid.d.ts +2 -2
- package/types/validateSchema.d.ts +2 -2
- package/types/wait.d.ts +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { expect, test } from 'vitest';
|
|
2
|
+
import utils from '../index.js';
|
|
3
|
+
import schemas from '../schemas.js';
|
|
4
|
+
|
|
5
|
+
// string
|
|
6
|
+
test('should create a random string', () => {
|
|
7
|
+
|
|
8
|
+
const randomString = utils.random.string({ minLength: 5, maxLength: 10 });
|
|
9
|
+
|
|
10
|
+
console.log('Generated random string:', randomString);
|
|
11
|
+
|
|
12
|
+
expect(randomString.length).toBeGreaterThanOrEqual(5);
|
|
13
|
+
expect(randomString.length).toBeLessThanOrEqual(10);
|
|
14
|
+
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// array value
|
|
18
|
+
test('should create a random array value', () => {
|
|
19
|
+
const sampleArray = ['apple', 'banana', 'cherry', 'date', 'elderberry'];
|
|
20
|
+
|
|
21
|
+
const randomValue = utils.random.arrayValue(sampleArray);
|
|
22
|
+
console.log('Generated random array value:', randomValue);
|
|
23
|
+
|
|
24
|
+
expect(sampleArray).toContain(randomValue);
|
|
25
|
+
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// boolean
|
|
29
|
+
test('should create a random boolean', () => {
|
|
30
|
+
const randomBoolean = utils.random.boolean();
|
|
31
|
+
console.log('Generated random boolean:', randomBoolean);
|
|
32
|
+
expect(typeof randomBoolean).toBe('boolean');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// integer
|
|
36
|
+
test('should create a random integer', () => {
|
|
37
|
+
const randomInteger = utils.random.integer({ min: 10, max: 20 });
|
|
38
|
+
console.log('Generated random integer:', randomInteger);
|
|
39
|
+
|
|
40
|
+
expect(randomInteger).toBeGreaterThanOrEqual(10);
|
|
41
|
+
expect(randomInteger).toBeLessThanOrEqual(20);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// number
|
|
45
|
+
test('should create a random number', () => {
|
|
46
|
+
const decimalPlaces = 3;
|
|
47
|
+
const randomNumber = utils.random.number({
|
|
48
|
+
min: 1.5,
|
|
49
|
+
max: 5.5,
|
|
50
|
+
decimalPlaces
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
console.log('Generated random number:', randomNumber);
|
|
54
|
+
|
|
55
|
+
expect(randomNumber).toBeGreaterThanOrEqual(1.5);
|
|
56
|
+
expect(randomNumber).toBeLessThanOrEqual(5.5);
|
|
57
|
+
|
|
58
|
+
const decimals =
|
|
59
|
+
Number.isInteger(randomNumber)
|
|
60
|
+
? 0
|
|
61
|
+
: randomNumber.toString().split('.')[1].length;
|
|
62
|
+
|
|
63
|
+
expect(decimals).toBeLessThanOrEqual(decimalPlaces);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// timestamp
|
|
67
|
+
test('should create a random timestamp', () => {
|
|
68
|
+
|
|
69
|
+
const randomTimestamp = utils.random.timestamp({
|
|
70
|
+
maxDays: 10,
|
|
71
|
+
minDays: 5,
|
|
72
|
+
future: true
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
console.log('Generated random timestamp:', randomTimestamp);
|
|
76
|
+
|
|
77
|
+
const randomTimestampPast = utils.random.timestamp({
|
|
78
|
+
maxDays: 10,
|
|
79
|
+
minDays: 5,
|
|
80
|
+
future: false
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
console.log('Generated random past timestamp:', randomTimestampPast);
|
|
84
|
+
|
|
85
|
+
// should be an ISO string
|
|
86
|
+
expect(new Date(randomTimestamp).toISOString()).toBe(randomTimestamp);
|
|
87
|
+
expect(new Date(randomTimestampPast).toISOString()).toBe(randomTimestampPast);
|
|
88
|
+
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// uuid
|
|
92
|
+
test('should create a random UUID', () => {
|
|
93
|
+
const randomUUID = utils.random.uuid();
|
|
94
|
+
console.log('Generated random UUID:', randomUUID);
|
|
95
|
+
expect(utils.isUUID(randomUUID)).toBe(true);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// object
|
|
99
|
+
test('should create a random object based on schema1', () => {
|
|
100
|
+
|
|
101
|
+
const randomObject = utils.random.object(schemas.schema1);
|
|
102
|
+
console.log('Generated random object (schema1):', randomObject);
|
|
103
|
+
expect(typeof randomObject).toBe('object');
|
|
104
|
+
|
|
105
|
+
expect(typeof randomObject.exampleId).toBe('string');
|
|
106
|
+
expect(Array.isArray(randomObject.exampleArray)).toBe(true);
|
|
107
|
+
expect(Array.isArray(randomObject.exampleArrayOfObjects)).toBe(true);
|
|
108
|
+
expect(typeof randomObject.exampleObject).toBe('object');
|
|
109
|
+
|
|
110
|
+
});
|
package/tests/uuid.test.js
CHANGED
package/types/build.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export default build;
|
|
2
|
-
declare function build({ src, dest, exportRoots, ignore, includeComments, dts, useTabs, }?: {
|
|
3
|
-
src?: string;
|
|
4
|
-
dest?: string;
|
|
5
|
-
exportRoots?: boolean;
|
|
6
|
-
ignore?: any[];
|
|
7
|
-
includeComments?: boolean;
|
|
8
|
-
dts?: boolean;
|
|
9
|
-
useTabs?: boolean;
|
|
10
|
-
}): Promise<boolean>;
|
|
1
|
+
export default build;
|
|
2
|
+
declare function build({ src, dest, exportRoots, ignore, includeComments, dts, useTabs, }?: {
|
|
3
|
+
src?: string;
|
|
4
|
+
dest?: string;
|
|
5
|
+
exportRoots?: boolean;
|
|
6
|
+
ignore?: any[];
|
|
7
|
+
includeComments?: boolean;
|
|
8
|
+
dts?: boolean;
|
|
9
|
+
useTabs?: boolean;
|
|
10
|
+
}): Promise<boolean>;
|
package/types/clean/array.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const _default: (arr: any, schema?: {}, { testMode, allOrNothing, path }?: {
|
|
2
|
-
testMode?: boolean;
|
|
3
|
-
allOrNothing?: boolean;
|
|
4
|
-
path?: string;
|
|
5
|
-
}) => any[];
|
|
6
|
-
export default _default;
|
|
1
|
+
declare const _default: (arr: any, schema?: {}, { testMode, allOrNothing, path }?: {
|
|
2
|
+
testMode?: boolean;
|
|
3
|
+
allOrNothing?: boolean;
|
|
4
|
+
path?: string;
|
|
5
|
+
}) => any[];
|
|
6
|
+
export default _default;
|
package/types/clean/boolean.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default function cleanBoolean(x: any, { required }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
}): any;
|
|
1
|
+
export default function cleanBoolean(x: any, { required }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
}): any;
|
package/types/clean/buffer.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export default function cleanBuffer(fileObj: any, { required, validTypes, minSize, maxSize, }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
validTypes?: any[];
|
|
4
|
-
minSize?: boolean;
|
|
5
|
-
maxSize?: boolean;
|
|
6
|
-
}): {
|
|
7
|
-
name: any;
|
|
8
|
-
type: any;
|
|
9
|
-
size: number;
|
|
10
|
-
encoding: any;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
};
|
|
1
|
+
export default function cleanBuffer(fileObj: any, { required, validTypes, minSize, maxSize, }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
validTypes?: any[];
|
|
4
|
+
minSize?: boolean;
|
|
5
|
+
maxSize?: boolean;
|
|
6
|
+
}): {
|
|
7
|
+
name: any;
|
|
8
|
+
type: any;
|
|
9
|
+
size: number;
|
|
10
|
+
encoding: any;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
};
|
package/types/clean/custom.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function cleanCustom(value: any, { required, validate, }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
validate?: any;
|
|
4
|
-
}): any;
|
|
1
|
+
export default function cleanCustom(value: any, { required, validate, }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
validate?: any;
|
|
4
|
+
}): any;
|
package/types/clean/file.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export default function cleanFile(file: any, { required, validTypes, minSize, maxSize, }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
validTypes?: any[];
|
|
4
|
-
minSize?: boolean;
|
|
5
|
-
maxSize?: boolean;
|
|
6
|
-
}): {
|
|
7
|
-
name: any;
|
|
8
|
-
type: any;
|
|
9
|
-
size: any;
|
|
10
|
-
lastModified: string;
|
|
11
|
-
};
|
|
1
|
+
export default function cleanFile(file: any, { required, validTypes, minSize, maxSize, }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
validTypes?: any[];
|
|
4
|
+
minSize?: boolean;
|
|
5
|
+
maxSize?: boolean;
|
|
6
|
+
}): {
|
|
7
|
+
name: any;
|
|
8
|
+
type: any;
|
|
9
|
+
size: any;
|
|
10
|
+
lastModified: string;
|
|
11
|
+
};
|
package/types/clean/integer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default function cleanInt(x: any, { required, convertString, min, max, }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
convertString?: boolean;
|
|
4
|
-
min?: boolean;
|
|
5
|
-
max?: boolean;
|
|
6
|
-
}): any;
|
|
1
|
+
export default function cleanInt(x: any, { required, convertString, min, max, }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
convertString?: boolean;
|
|
4
|
+
min?: boolean;
|
|
5
|
+
max?: boolean;
|
|
6
|
+
}): any;
|
package/types/clean/number.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export default function cleanNumber(x: any, { required, convertString, min, max, maxDecimal, minDecimal, }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
convertString?: boolean;
|
|
4
|
-
min?: boolean;
|
|
5
|
-
max?: boolean;
|
|
6
|
-
maxDecimal?: boolean;
|
|
7
|
-
minDecimal?: boolean;
|
|
8
|
-
}): any;
|
|
1
|
+
export default function cleanNumber(x: any, { required, convertString, min, max, maxDecimal, minDecimal, }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
convertString?: boolean;
|
|
4
|
+
min?: boolean;
|
|
5
|
+
max?: boolean;
|
|
6
|
+
maxDecimal?: boolean;
|
|
7
|
+
minDecimal?: boolean;
|
|
8
|
+
}): any;
|
package/types/clean/object.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const _default: (obj: any, schema: any, { testMode, allOrNothing, path }?: {
|
|
2
|
-
testMode?: boolean;
|
|
3
|
-
allOrNothing?: boolean;
|
|
4
|
-
path?: string;
|
|
5
|
-
}) => {};
|
|
6
|
-
export default _default;
|
|
1
|
+
declare const _default: (obj: any, schema: any, { testMode, allOrNothing, path }?: {
|
|
2
|
+
testMode?: boolean;
|
|
3
|
+
allOrNothing?: boolean;
|
|
4
|
+
path?: string;
|
|
5
|
+
}) => {};
|
|
6
|
+
export default _default;
|
package/types/clean/string.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export default function cleanString(x: any, { required, minLength, maxLength, allowHtml, allowScripts, validValues, format, pattern }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
minLength?: boolean;
|
|
4
|
-
maxLength?: boolean;
|
|
5
|
-
allowHtml?: boolean;
|
|
6
|
-
allowScripts?: boolean;
|
|
7
|
-
validValues?: boolean;
|
|
8
|
-
format?: boolean;
|
|
9
|
-
pattern?: boolean;
|
|
10
|
-
}): string;
|
|
1
|
+
export default function cleanString(x: any, { required, minLength, maxLength, allowHtml, allowScripts, validValues, format, pattern }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
minLength?: boolean;
|
|
4
|
+
maxLength?: boolean;
|
|
5
|
+
allowHtml?: boolean;
|
|
6
|
+
allowScripts?: boolean;
|
|
7
|
+
validValues?: boolean;
|
|
8
|
+
format?: boolean;
|
|
9
|
+
pattern?: boolean;
|
|
10
|
+
}): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default function cleanTimestamp(isoDateTimeString: any, { required, maxDaysInFuture, maxDaysInFPast, }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
maxDaysInFuture?: boolean;
|
|
4
|
-
maxDaysInFPast?: boolean;
|
|
5
|
-
}): string;
|
|
1
|
+
export default function cleanTimestamp(isoDateTimeString: any, { required, maxDaysInFuture, maxDaysInFPast, }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
maxDaysInFuture?: boolean;
|
|
4
|
+
maxDaysInFPast?: boolean;
|
|
5
|
+
}): string;
|
package/types/clean/uuid.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default function cleanUUID(uuid: any, { required, }?: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
}): string;
|
|
1
|
+
export default function cleanUUID(uuid: any, { required, }?: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
}): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default run;
|
|
2
|
-
declare function run(filePath: any, { returnCode, jsMaps, cssMaps }?: {
|
|
3
|
-
returnCode?: boolean;
|
|
4
|
-
jsMaps?: {};
|
|
5
|
-
cssMaps?: {};
|
|
6
|
-
}): any[];
|
|
1
|
+
export default run;
|
|
2
|
+
declare function run(filePath: any, { returnCode, jsMaps, cssMaps }?: {
|
|
3
|
+
returnCode?: boolean;
|
|
4
|
+
jsMaps?: {};
|
|
5
|
+
cssMaps?: {};
|
|
6
|
+
}): any[];
|
package/types/combineFiles.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export default combineFiles;
|
|
2
|
-
declare function combineFiles(dir: any, fileType: any, { minify, processContent, }?: {
|
|
3
|
-
minify?: boolean;
|
|
4
|
-
processContent?: ({ content, path }: {
|
|
5
|
-
content: any;
|
|
6
|
-
path: any;
|
|
7
|
-
}) => any;
|
|
8
|
-
}): string;
|
|
1
|
+
export default combineFiles;
|
|
2
|
+
declare function combineFiles(dir: any, fileType: any, { minify, processContent, }?: {
|
|
3
|
+
minify?: boolean;
|
|
4
|
+
processContent?: ({ content, path }: {
|
|
5
|
+
content: any;
|
|
6
|
+
path: any;
|
|
7
|
+
}) => any;
|
|
8
|
+
}): string;
|
package/types/convertBytes.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a given number of bytes into a more readable string format with appropriate units.
|
|
3
|
-
*
|
|
4
|
-
* @param {number} bytes - The number of bytes to convert.
|
|
5
|
-
* @param {number} [precision=2] - The number of decimal places to include in the result.
|
|
6
|
-
* @returns {string} The converted bytes in a string format with appropriate units.
|
|
7
|
-
*/
|
|
8
|
-
export default function convertBytes(bytes: number, precision?: number): string;
|
|
1
|
+
/**
|
|
2
|
+
* Converts a given number of bytes into a more readable string format with appropriate units.
|
|
3
|
+
*
|
|
4
|
+
* @param {number} bytes - The number of bytes to convert.
|
|
5
|
+
* @param {number} [precision=2] - The number of decimal places to include in the result.
|
|
6
|
+
* @returns {string} The converted bytes in a string format with appropriate units.
|
|
7
|
+
*/
|
|
8
|
+
export default function convertBytes(bytes: number, precision?: number): string;
|
package/types/decrypt.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function decrypt(encryptedData: any, key?: any): any;
|
|
1
|
+
export default function decrypt(encryptedData: any, key?: any): any;
|
package/types/each.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Iterates over elements of an array or properties of an object, invoking a callback for each element/property.
|
|
3
|
-
* The iteration stops if the callback returns `false`.
|
|
4
|
-
*
|
|
5
|
-
* @example each({ a: 1, b: 2 }, (value, key) => { console.log(value, key); });
|
|
6
|
-
* @param {Object|Array} objectOrArray - The object or array to iterate over.
|
|
7
|
-
* @param {Function} callback - The function to invoke per iteration. It is invoked with two arguments: (value, key/index).
|
|
8
|
-
* @returns {void}
|
|
9
|
-
*/
|
|
10
|
-
export default function each(objectOrArray: any | any[], callback: Function): void;
|
|
1
|
+
/**
|
|
2
|
+
* Iterates over elements of an array or properties of an object, invoking a callback for each element/property.
|
|
3
|
+
* The iteration stops if the callback returns `false`.
|
|
4
|
+
*
|
|
5
|
+
* @example each({ a: 1, b: 2 }, (value, key) => { console.log(value, key); });
|
|
6
|
+
* @param {Object|Array} objectOrArray - The object or array to iterate over.
|
|
7
|
+
* @param {Function} callback - The function to invoke per iteration. It is invoked with two arguments: (value, key/index).
|
|
8
|
+
* @returns {void}
|
|
9
|
+
*/
|
|
10
|
+
export default function each(objectOrArray: any | any[], callback: Function): void;
|
package/types/eachAsync.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function eachAsync(objectOrArray: any, callback: any): Promise<void>;
|
|
1
|
+
export default function eachAsync(objectOrArray: any, callback: any): Promise<void>;
|
package/types/encrypt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default function encrypt(plainText: any, key?: any): {
|
|
2
|
-
iv: any;
|
|
3
|
-
authTag: any;
|
|
4
|
-
cipherText: any;
|
|
5
|
-
};
|
|
1
|
+
export default function encrypt(plainText: any, key?: any): {
|
|
2
|
+
iv: any;
|
|
3
|
+
authTag: any;
|
|
4
|
+
cipherText: any;
|
|
5
|
+
};
|
package/types/getAllFiles.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default function getAllFiles(base: any, { dir, files, ignore, fileTypes }?: {
|
|
2
|
-
dir?: string;
|
|
3
|
-
files?: any[];
|
|
4
|
-
ignore?: any[];
|
|
5
|
-
fileTypes?: any[];
|
|
6
|
-
}): any[];
|
|
1
|
+
export default function getAllFiles(base: any, { dir, files, ignore, fileTypes }?: {
|
|
2
|
+
dir?: string;
|
|
3
|
+
files?: any[];
|
|
4
|
+
ignore?: any[];
|
|
5
|
+
fileTypes?: any[];
|
|
6
|
+
}): any[];
|