@wavy/fn 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +5 -0
- package/dist/main.d.cts +4 -9
- package/dist/main.d.ts +4 -9
- package/dist/main.js +4 -0
- package/package.json +2 -2
package/dist/main.cjs
CHANGED
|
@@ -43,6 +43,7 @@ __export(main_exports, {
|
|
|
43
43
|
formatInvoiceNo: () => formatInvoiceNo,
|
|
44
44
|
getCaps: () => getCaps,
|
|
45
45
|
getFileExt: () => getFileExt,
|
|
46
|
+
getMimeTypes: () => getMimeTypes,
|
|
46
47
|
group: () => group,
|
|
47
48
|
hasIndex: () => hasIndex,
|
|
48
49
|
ifDefined: () => ifDefined,
|
|
@@ -578,6 +579,9 @@ var toObject = new class T {
|
|
|
578
579
|
} else throw new Error(`The arguments supplied are insufficient.`);
|
|
579
580
|
}
|
|
580
581
|
}().invoke;
|
|
582
|
+
function getMimeTypes(typeAliases) {
|
|
583
|
+
return distinct(strictArray(typeAliases)).map((alias) => import_types.LOCAL_FILE_MIME_TYPES[alias]).flat();
|
|
584
|
+
}
|
|
581
585
|
function classNameResolver(baseClassName) {
|
|
582
586
|
return (className) => {
|
|
583
587
|
return `${baseClassName}-${className}`;
|
|
@@ -1100,6 +1104,7 @@ var serverDataAdapter = new ServerDataAdapter().invoke;
|
|
|
1100
1104
|
formatInvoiceNo,
|
|
1101
1105
|
getCaps,
|
|
1102
1106
|
getFileExt,
|
|
1107
|
+
getMimeTypes,
|
|
1103
1108
|
group,
|
|
1104
1109
|
hasIndex,
|
|
1105
1110
|
ifDefined,
|
package/dist/main.d.cts
CHANGED
|
@@ -58,15 +58,10 @@ declare const toObject: {
|
|
|
58
58
|
filepath: string;
|
|
59
59
|
filename: string;
|
|
60
60
|
typeAlias: LocalFile["typeAlias"];
|
|
61
|
-
}> | undefined):
|
|
62
|
-
|
|
63
|
-
description: string;
|
|
64
|
-
filepath: string;
|
|
65
|
-
filename: string;
|
|
66
|
-
typeAlias: LocalFile["typeAlias"];
|
|
67
|
-
}>) => LocalFile>;
|
|
68
|
-
(localFile: LocalFile | SanitizeLocalType<LocalFile>): ReturnType<(<LocalFileType extends LocalFile | SanitizeLocalType<LocalFile>>(localFile: LocalFileType) => File)>;
|
|
61
|
+
}> | undefined): LocalFile;
|
|
62
|
+
(localFile: LocalFile | SanitizeLocalType<LocalFile>): File;
|
|
69
63
|
};
|
|
64
|
+
declare function getMimeTypes(typeAliases: KnownFileTypeAlias[]): string[];
|
|
70
65
|
declare function classNameResolver(baseClassName: string): (className: string) => string;
|
|
71
66
|
declare function classNameExt(rootClassName: string): (className: string) => string;
|
|
72
67
|
declare function range(start: number, end: number): number[];
|
|
@@ -182,4 +177,4 @@ declare const serverDataAdapter: {
|
|
|
182
177
|
}>(event: "unzip", data: DataType): NormalizeFromServer<DataType>;
|
|
183
178
|
};
|
|
184
179
|
|
|
185
|
-
export { addArticle, arrayWithConst, asyncRun, averageOf, blankSpaces, buildArray, camelCaseToLetter, classNameExt, classNameResolver, coerceIn, copyToClipboard, count, dataSearcher, distinct, drop, dropLast, dropLastWhile, dropWhile, format, formatGCTRegNo, formatInvoiceNo, getCaps, getFileExt, group, hasIndex, ifDefined, ifEmpty, inRange, indexOf, indices, inferFilename, insertAt, isEmpty, isFile, isLetter, isLocalFile, isNumber, lastIndex, map, mapToArray, maxOf, minOf, negate, ordinalIndicator, overwrite, pluralize, poll, random, range, readClipboardText, removeAll, repeat, run, serverDataAdapter, someValuesEmpty, sort, strictArray, stringToSearch, subObjectList, sumOf, take, takeLast, takeLastWhile, takeWhile, timeDuration, toNumber, toObject, trimString, undefinedIfEmpty, upperFirst, windowed };
|
|
180
|
+
export { addArticle, arrayWithConst, asyncRun, averageOf, blankSpaces, buildArray, camelCaseToLetter, classNameExt, classNameResolver, coerceIn, copyToClipboard, count, dataSearcher, distinct, drop, dropLast, dropLastWhile, dropWhile, format, formatGCTRegNo, formatInvoiceNo, getCaps, getFileExt, getMimeTypes, group, hasIndex, ifDefined, ifEmpty, inRange, indexOf, indices, inferFilename, insertAt, isEmpty, isFile, isLetter, isLocalFile, isNumber, lastIndex, map, mapToArray, maxOf, minOf, negate, ordinalIndicator, overwrite, pluralize, poll, random, range, readClipboardText, removeAll, repeat, run, serverDataAdapter, someValuesEmpty, sort, strictArray, stringToSearch, subObjectList, sumOf, take, takeLast, takeLastWhile, takeWhile, timeDuration, toNumber, toObject, trimString, undefinedIfEmpty, upperFirst, windowed };
|
package/dist/main.d.ts
CHANGED
|
@@ -58,15 +58,10 @@ declare const toObject: {
|
|
|
58
58
|
filepath: string;
|
|
59
59
|
filename: string;
|
|
60
60
|
typeAlias: LocalFile["typeAlias"];
|
|
61
|
-
}> | undefined):
|
|
62
|
-
|
|
63
|
-
description: string;
|
|
64
|
-
filepath: string;
|
|
65
|
-
filename: string;
|
|
66
|
-
typeAlias: LocalFile["typeAlias"];
|
|
67
|
-
}>) => LocalFile>;
|
|
68
|
-
(localFile: LocalFile | SanitizeLocalType<LocalFile>): ReturnType<(<LocalFileType extends LocalFile | SanitizeLocalType<LocalFile>>(localFile: LocalFileType) => File)>;
|
|
61
|
+
}> | undefined): LocalFile;
|
|
62
|
+
(localFile: LocalFile | SanitizeLocalType<LocalFile>): File;
|
|
69
63
|
};
|
|
64
|
+
declare function getMimeTypes(typeAliases: KnownFileTypeAlias[]): string[];
|
|
70
65
|
declare function classNameResolver(baseClassName: string): (className: string) => string;
|
|
71
66
|
declare function classNameExt(rootClassName: string): (className: string) => string;
|
|
72
67
|
declare function range(start: number, end: number): number[];
|
|
@@ -182,4 +177,4 @@ declare const serverDataAdapter: {
|
|
|
182
177
|
}>(event: "unzip", data: DataType): NormalizeFromServer<DataType>;
|
|
183
178
|
};
|
|
184
179
|
|
|
185
|
-
export { addArticle, arrayWithConst, asyncRun, averageOf, blankSpaces, buildArray, camelCaseToLetter, classNameExt, classNameResolver, coerceIn, copyToClipboard, count, dataSearcher, distinct, drop, dropLast, dropLastWhile, dropWhile, format, formatGCTRegNo, formatInvoiceNo, getCaps, getFileExt, group, hasIndex, ifDefined, ifEmpty, inRange, indexOf, indices, inferFilename, insertAt, isEmpty, isFile, isLetter, isLocalFile, isNumber, lastIndex, map, mapToArray, maxOf, minOf, negate, ordinalIndicator, overwrite, pluralize, poll, random, range, readClipboardText, removeAll, repeat, run, serverDataAdapter, someValuesEmpty, sort, strictArray, stringToSearch, subObjectList, sumOf, take, takeLast, takeLastWhile, takeWhile, timeDuration, toNumber, toObject, trimString, undefinedIfEmpty, upperFirst, windowed };
|
|
180
|
+
export { addArticle, arrayWithConst, asyncRun, averageOf, blankSpaces, buildArray, camelCaseToLetter, classNameExt, classNameResolver, coerceIn, copyToClipboard, count, dataSearcher, distinct, drop, dropLast, dropLastWhile, dropWhile, format, formatGCTRegNo, formatInvoiceNo, getCaps, getFileExt, getMimeTypes, group, hasIndex, ifDefined, ifEmpty, inRange, indexOf, indices, inferFilename, insertAt, isEmpty, isFile, isLetter, isLocalFile, isNumber, lastIndex, map, mapToArray, maxOf, minOf, negate, ordinalIndicator, overwrite, pluralize, poll, random, range, readClipboardText, removeAll, repeat, run, serverDataAdapter, someValuesEmpty, sort, strictArray, stringToSearch, subObjectList, sumOf, take, takeLast, takeLastWhile, takeWhile, timeDuration, toNumber, toObject, trimString, undefinedIfEmpty, upperFirst, windowed };
|
package/dist/main.js
CHANGED
|
@@ -482,6 +482,9 @@ var toObject = new class T {
|
|
|
482
482
|
} else throw new Error(`The arguments supplied are insufficient.`);
|
|
483
483
|
}
|
|
484
484
|
}().invoke;
|
|
485
|
+
function getMimeTypes(typeAliases) {
|
|
486
|
+
return distinct(strictArray(typeAliases)).map((alias) => LOCAL_FILE_MIME_TYPES[alias]).flat();
|
|
487
|
+
}
|
|
485
488
|
function classNameResolver(baseClassName) {
|
|
486
489
|
return (className) => {
|
|
487
490
|
return `${baseClassName}-${className}`;
|
|
@@ -1003,6 +1006,7 @@ export {
|
|
|
1003
1006
|
formatInvoiceNo,
|
|
1004
1007
|
getCaps,
|
|
1005
1008
|
getFileExt,
|
|
1009
|
+
getMimeTypes,
|
|
1006
1010
|
group,
|
|
1007
1011
|
hasIndex,
|
|
1008
1012
|
ifDefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavy/fn",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"main": "./dist/main.js",
|
|
5
5
|
"module": "./dist/main.cjs",
|
|
6
6
|
"types": "./dist/main.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"description": "",
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^24.5.2",
|
|
25
|
-
"@wavy/types": "^0.0.
|
|
25
|
+
"@wavy/types": "^0.0.26",
|
|
26
26
|
"tsup": "^8.5.0",
|
|
27
27
|
"typescript": "^5.9.2"
|
|
28
28
|
}
|