@odinlin/utils 1.0.0 → 1.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 (40) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/browser/browser.cjs +2 -0
  3. package/dist/browser/browser.d.ts +2 -1
  4. package/dist/browser/browser.js +2 -1
  5. package/dist/browser/promise/delay.cjs +8 -0
  6. package/dist/browser/promise/delay.d.ts +5 -0
  7. package/dist/browser/promise/delay.d.ts.map +1 -0
  8. package/dist/browser/promise/delay.js +8 -0
  9. package/dist/browser/promise/delay.js.map +1 -0
  10. package/dist/browser/promise/index.cjs +2 -0
  11. package/dist/browser/promise/index.d.ts +2 -1
  12. package/dist/browser/promise/index.js +2 -1
  13. package/dist/browser/string/className.d.ts.map +1 -1
  14. package/dist/noExternal/browser.esm.js +7 -1
  15. package/dist/noExternal/browser.esm.min.js +7 -7
  16. package/dist/noExternal/browser.esm.min.js.map +1 -1
  17. package/dist/noExternal/browser.umd.js +7 -0
  18. package/dist/noExternal/browser.umd.min.js +9 -9
  19. package/dist/noExternal/browser.umd.min.js.map +1 -1
  20. package/dist/noExternal/node.cjs.js +3624 -1
  21. package/dist/noExternal/node.cjs.min.js +37 -0
  22. package/dist/noExternal/node.cjs.min.js.map +1 -1
  23. package/dist/noExternal/node.esm.js +7 -1
  24. package/dist/noExternal/node.esm.min.js +15 -15
  25. package/dist/noExternal/node.esm.min.js.map +1 -1
  26. package/dist/node/node.cjs +2 -0
  27. package/dist/node/node.d.ts +2 -1
  28. package/dist/node/node.js +2 -1
  29. package/dist/node/promise/delay.cjs +8 -0
  30. package/dist/node/promise/delay.d.ts +5 -0
  31. package/dist/node/promise/delay.d.ts.map +1 -0
  32. package/dist/node/promise/delay.js +8 -0
  33. package/dist/node/promise/delay.js.map +1 -0
  34. package/dist/node/promise/index.cjs +2 -0
  35. package/dist/node/promise/index.d.ts +2 -1
  36. package/dist/node/promise/index.js +2 -1
  37. package/dist/node/string/className.d.ts.map +1 -1
  38. package/dist/version.js +1 -1
  39. package/dist/version.js.map +1 -1
  40. package/package.json +14 -15
@@ -15,6 +15,7 @@ const require_fileType_node = require('./file/fileType.node.cjs');
15
15
  const require_fileXml_node = require('./file/fileXml.node.cjs');
16
16
  const require_objectClone = require('./object/objectClone.cjs');
17
17
  const require_awaitTo = require('./promise/awaitTo.cjs');
18
+ const require_delay = require('./promise/delay.cjs');
18
19
  const require_pLimit = require('./promise/pLimit.cjs');
19
20
  const require_OTHERS = require('./regexp/OTHERS.cjs');
20
21
  const require_RULES = require('./regexp/RULES.cjs');
@@ -185,6 +186,7 @@ exports.presetInterceptorWithRequestLog = require_interceptors_node.presetInterc
185
186
  exports.presetInterceptorWithResponseJSON = require_interceptors_node.presetInterceptorWithResponseJSON;
186
187
  exports.presetInterceptorWithResponseLog = require_interceptors_node.presetInterceptorWithResponseLog;
187
188
  exports.promiseAwaitTo = require_awaitTo.promiseAwaitTo;
189
+ exports.promiseDelay = require_delay.promiseDelay;
188
190
  exports.promiseLimit = require_pLimit.promiseLimit;
189
191
  exports.promiseLimitFunction = require_pLimit.promiseLimitFunction;
190
192
  exports.stringClsn = require_className.stringClsn;
@@ -18,6 +18,7 @@ import { Buffer } from "./file/node.js";
18
18
  import { functionDebounce, functionThrottle } from "./function/index.js";
19
19
  import { objectClone } from "./object/objectClone.js";
20
20
  import { promiseAwaitTo } from "./promise/awaitTo.js";
21
+ import { promiseDelay } from "./promise/delay.js";
21
22
  import { PromiseLimitFunction, PromiseLimitFunctionOptions, promiseLimit, promiseLimitFunction } from "./promise/pLimit.js";
22
23
  /// import "./promise/index.js";
23
24
  import { anyRuleWithBrace, anyRuleWithBracket } from "./regexp/OTHERS.js";
@@ -34,4 +35,4 @@ import { TreeFilterParams, TreeOptions } from "./tree/interface.js";
34
35
  import { treeFilter } from "./tree/treeFilter.js";
35
36
  import { treeFlatten } from "./tree/treeFlatten.js";
36
37
  import { treeGenerate } from "./tree/treeGenerate.js";
37
- export { AnyWebReadableByteStreamWithFileType, ArrayCastReturn, AxiosCreateDefaultsWrapper, AxiosInterceptorParameters, AxiosRequestConfigWrapper, AxiosResponseWrapper, Buffer, CONSTANT_EMPTY_ARRAY, CONSTANT_EMPTY_OBJECT, CONSTANT_NOOP, DOMParser, DatePrettyMsOptions, DateTimeAgoLocaleFunc, DateTimeAgoLocaleMap, DateTimeAgoOpts, DateTimeAgoTDate, DateTimeAgoTimerPool, FileBlobOptions, FileBuffer, FileBufferEncoding, FileBytesOptions, FileTypeOptions, FileTypeParser, FileTypeResult, PromiseLimitFunction, PromiseLimitFunctionOptions, RegExpRule, Request, StreamOptions, StringClsnValue, StringClsxValue, TreeFilterParams, TreeOptions, TypeJSONValue, TypeNil, TypePrimitive, TypeTypedArray, XMLSerializer, anyRule1, anyRule10, anyRule11, anyRule12, anyRule13, anyRule14, anyRule15, anyRule16, anyRule17, anyRule18, anyRule19, anyRule2, anyRule20, anyRule21, anyRule22, anyRule23, anyRule24, anyRule25, anyRule26, anyRule27, anyRule28, anyRule29, anyRule3, anyRule30, anyRule31, anyRule32, anyRule33, anyRule34, anyRule35, anyRule36, anyRule37, anyRule38, anyRule39, anyRule4, anyRule40, anyRule41, anyRule42, anyRule43, anyRule44, anyRule45, anyRule46, anyRule47, anyRule48, anyRule49, anyRule5, anyRule50, anyRule51, anyRule52, anyRule53, anyRule54, anyRule55, anyRule56, anyRule57, anyRule58, anyRule59, anyRule6, anyRule60, anyRule61, anyRule62, anyRule63, anyRule64, anyRule65, anyRule66, anyRule67, anyRule68, anyRule69, anyRule7, anyRule70, anyRule71, anyRule72, anyRule73, anyRule74, anyRule75, anyRule76, anyRule77, anyRule78, anyRule79, anyRule8, anyRule80, anyRule81, anyRule82, anyRule83, anyRule84, anyRule9, anyRuleWithBrace, anyRuleWithBracket, arrayCast, datePrettyMs, dateTimeAgoFormat, dateTimeAgoLocale, dateTimeAgoRender, dateTimeAgoRenderCancel, fileBytes, fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromStream, fileTypeFromTokenizer, fileTypeStream, fileTypeSupportedExtensions, fileTypeSupportedMimeTypes, functionDebounce, functionThrottle, isArray, isBigInt, isBoolean, isBooleanLike, isBrowser, isDate, isEmpty, isError, isFunction, isJSONArray, isJSONObject, isJSONString, isJSONValue, isMap, isNil, isNode, isNotNumber, isNull, isNumber, isNumberLike, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isStringLike, isSymbol, isTagOf, isTypeOf, isTypeOfResult, isUndefined, isWeakMap, isWeakSet, objectClone, presetInterceptorWithRequestAuth, presetInterceptorWithRequestLog, presetInterceptorWithResponseJSON, presetInterceptorWithResponseLog, promiseAwaitTo, promiseLimit, promiseLimitFunction, stringClsn, stringClsx, stringReplaceParametersWithObj, stringSliceParametersWithSort, treeFilter, treeFlatten, treeGenerate };
38
+ export { AnyWebReadableByteStreamWithFileType, ArrayCastReturn, AxiosCreateDefaultsWrapper, AxiosInterceptorParameters, AxiosRequestConfigWrapper, AxiosResponseWrapper, Buffer, CONSTANT_EMPTY_ARRAY, CONSTANT_EMPTY_OBJECT, CONSTANT_NOOP, DOMParser, DatePrettyMsOptions, DateTimeAgoLocaleFunc, DateTimeAgoLocaleMap, DateTimeAgoOpts, DateTimeAgoTDate, DateTimeAgoTimerPool, FileBlobOptions, FileBuffer, FileBufferEncoding, FileBytesOptions, FileTypeOptions, FileTypeParser, FileTypeResult, PromiseLimitFunction, PromiseLimitFunctionOptions, RegExpRule, Request, StreamOptions, StringClsnValue, StringClsxValue, TreeFilterParams, TreeOptions, TypeJSONValue, TypeNil, TypePrimitive, TypeTypedArray, XMLSerializer, anyRule1, anyRule10, anyRule11, anyRule12, anyRule13, anyRule14, anyRule15, anyRule16, anyRule17, anyRule18, anyRule19, anyRule2, anyRule20, anyRule21, anyRule22, anyRule23, anyRule24, anyRule25, anyRule26, anyRule27, anyRule28, anyRule29, anyRule3, anyRule30, anyRule31, anyRule32, anyRule33, anyRule34, anyRule35, anyRule36, anyRule37, anyRule38, anyRule39, anyRule4, anyRule40, anyRule41, anyRule42, anyRule43, anyRule44, anyRule45, anyRule46, anyRule47, anyRule48, anyRule49, anyRule5, anyRule50, anyRule51, anyRule52, anyRule53, anyRule54, anyRule55, anyRule56, anyRule57, anyRule58, anyRule59, anyRule6, anyRule60, anyRule61, anyRule62, anyRule63, anyRule64, anyRule65, anyRule66, anyRule67, anyRule68, anyRule69, anyRule7, anyRule70, anyRule71, anyRule72, anyRule73, anyRule74, anyRule75, anyRule76, anyRule77, anyRule78, anyRule79, anyRule8, anyRule80, anyRule81, anyRule82, anyRule83, anyRule84, anyRule9, anyRuleWithBrace, anyRuleWithBracket, arrayCast, datePrettyMs, dateTimeAgoFormat, dateTimeAgoLocale, dateTimeAgoRender, dateTimeAgoRenderCancel, fileBytes, fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromStream, fileTypeFromTokenizer, fileTypeStream, fileTypeSupportedExtensions, fileTypeSupportedMimeTypes, functionDebounce, functionThrottle, isArray, isBigInt, isBoolean, isBooleanLike, isBrowser, isDate, isEmpty, isError, isFunction, isJSONArray, isJSONObject, isJSONString, isJSONValue, isMap, isNil, isNode, isNotNumber, isNull, isNumber, isNumberLike, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isStringLike, isSymbol, isTagOf, isTypeOf, isTypeOfResult, isUndefined, isWeakMap, isWeakSet, objectClone, presetInterceptorWithRequestAuth, presetInterceptorWithRequestLog, presetInterceptorWithResponseJSON, presetInterceptorWithResponseLog, promiseAwaitTo, promiseDelay, promiseLimit, promiseLimitFunction, stringClsn, stringClsx, stringReplaceParametersWithObj, stringSliceParametersWithSort, treeFilter, treeFlatten, treeGenerate };
package/dist/node/node.js CHANGED
@@ -15,6 +15,7 @@ import { DOMParser, XMLSerializer } from "./file/fileXml.node.js";
15
15
  import { Buffer } from "./file/node.js";
16
16
  import { objectClone } from "./object/objectClone.js";
17
17
  import { promiseAwaitTo } from "./promise/awaitTo.js";
18
+ import { promiseDelay } from "./promise/delay.js";
18
19
  import { promiseLimit, promiseLimitFunction } from "./promise/pLimit.js";
19
20
  import { anyRuleWithBrace, anyRuleWithBracket } from "./regexp/OTHERS.js";
20
21
  import { anyRule1, anyRule10, anyRule11, anyRule12, anyRule13, anyRule14, anyRule15, anyRule16, anyRule17, anyRule18, anyRule19, anyRule2, anyRule20, anyRule21, anyRule22, anyRule23, anyRule24, anyRule25, anyRule26, anyRule27, anyRule28, anyRule29, anyRule3, anyRule30, anyRule31, anyRule32, anyRule33, anyRule34, anyRule35, anyRule36, anyRule37, anyRule38, anyRule39, anyRule4, anyRule40, anyRule41, anyRule42, anyRule43, anyRule44, anyRule45, anyRule46, anyRule47, anyRule48, anyRule49, anyRule5, anyRule50, anyRule51, anyRule52, anyRule53, anyRule54, anyRule55, anyRule56, anyRule57, anyRule58, anyRule59, anyRule6, anyRule60, anyRule61, anyRule62, anyRule63, anyRule64, anyRule65, anyRule66, anyRule67, anyRule68, anyRule69, anyRule7, anyRule70, anyRule71, anyRule72, anyRule73, anyRule74, anyRule75, anyRule76, anyRule77, anyRule78, anyRule79, anyRule8, anyRule80, anyRule81, anyRule82, anyRule83, anyRule84, anyRule9 } from "./regexp/RULES.js";
@@ -27,4 +28,4 @@ import { treeFlatten } from "./tree/treeFlatten.js";
27
28
  import { treeGenerate } from "./tree/treeGenerate.js";
28
29
  import { functionDebounce, functionThrottle } from "./function/index.js";
29
30
 
30
- export { Buffer, CONSTANT_EMPTY_ARRAY, CONSTANT_EMPTY_OBJECT, CONSTANT_NOOP, DOMParser, FileBuffer, FileTypeParser, Request, XMLSerializer, anyRule1, anyRule10, anyRule11, anyRule12, anyRule13, anyRule14, anyRule15, anyRule16, anyRule17, anyRule18, anyRule19, anyRule2, anyRule20, anyRule21, anyRule22, anyRule23, anyRule24, anyRule25, anyRule26, anyRule27, anyRule28, anyRule29, anyRule3, anyRule30, anyRule31, anyRule32, anyRule33, anyRule34, anyRule35, anyRule36, anyRule37, anyRule38, anyRule39, anyRule4, anyRule40, anyRule41, anyRule42, anyRule43, anyRule44, anyRule45, anyRule46, anyRule47, anyRule48, anyRule49, anyRule5, anyRule50, anyRule51, anyRule52, anyRule53, anyRule54, anyRule55, anyRule56, anyRule57, anyRule58, anyRule59, anyRule6, anyRule60, anyRule61, anyRule62, anyRule63, anyRule64, anyRule65, anyRule66, anyRule67, anyRule68, anyRule69, anyRule7, anyRule70, anyRule71, anyRule72, anyRule73, anyRule74, anyRule75, anyRule76, anyRule77, anyRule78, anyRule79, anyRule8, anyRule80, anyRule81, anyRule82, anyRule83, anyRule84, anyRule9, anyRuleWithBrace, anyRuleWithBracket, arrayCast, datePrettyMs, dateTimeAgoFormat, dateTimeAgoLocale, dateTimeAgoRender, dateTimeAgoRenderCancel, fileBytes, fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromStream, fileTypeFromTokenizer, fileTypeStream, fileTypeSupportedExtensions, fileTypeSupportedMimeTypes, functionDebounce, functionThrottle, isArray, isBigInt, isBoolean, isBooleanLike, isBrowser, isDate, isEmpty, isError, isFunction, isJSONArray, isJSONObject, isJSONString, isJSONValue, isMap, isNil, isNode, isNotNumber, isNull, isNumber, isNumberLike, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isStringLike, isSymbol, isTagOf, isTypeOf, isTypeOfResult, isUndefined, isWeakMap, isWeakSet, objectClone, presetInterceptorWithRequestAuth, presetInterceptorWithRequestLog, presetInterceptorWithResponseJSON, presetInterceptorWithResponseLog, promiseAwaitTo, promiseLimit, promiseLimitFunction, stringClsn, stringClsx, stringReplaceParametersWithObj, stringSliceParametersWithSort, treeFilter, treeFlatten, treeGenerate };
31
+ export { Buffer, CONSTANT_EMPTY_ARRAY, CONSTANT_EMPTY_OBJECT, CONSTANT_NOOP, DOMParser, FileBuffer, FileTypeParser, Request, XMLSerializer, anyRule1, anyRule10, anyRule11, anyRule12, anyRule13, anyRule14, anyRule15, anyRule16, anyRule17, anyRule18, anyRule19, anyRule2, anyRule20, anyRule21, anyRule22, anyRule23, anyRule24, anyRule25, anyRule26, anyRule27, anyRule28, anyRule29, anyRule3, anyRule30, anyRule31, anyRule32, anyRule33, anyRule34, anyRule35, anyRule36, anyRule37, anyRule38, anyRule39, anyRule4, anyRule40, anyRule41, anyRule42, anyRule43, anyRule44, anyRule45, anyRule46, anyRule47, anyRule48, anyRule49, anyRule5, anyRule50, anyRule51, anyRule52, anyRule53, anyRule54, anyRule55, anyRule56, anyRule57, anyRule58, anyRule59, anyRule6, anyRule60, anyRule61, anyRule62, anyRule63, anyRule64, anyRule65, anyRule66, anyRule67, anyRule68, anyRule69, anyRule7, anyRule70, anyRule71, anyRule72, anyRule73, anyRule74, anyRule75, anyRule76, anyRule77, anyRule78, anyRule79, anyRule8, anyRule80, anyRule81, anyRule82, anyRule83, anyRule84, anyRule9, anyRuleWithBrace, anyRuleWithBracket, arrayCast, datePrettyMs, dateTimeAgoFormat, dateTimeAgoLocale, dateTimeAgoRender, dateTimeAgoRenderCancel, fileBytes, fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromStream, fileTypeFromTokenizer, fileTypeStream, fileTypeSupportedExtensions, fileTypeSupportedMimeTypes, functionDebounce, functionThrottle, isArray, isBigInt, isBoolean, isBooleanLike, isBrowser, isDate, isEmpty, isError, isFunction, isJSONArray, isJSONObject, isJSONString, isJSONValue, isMap, isNil, isNode, isNotNumber, isNull, isNumber, isNumberLike, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isStringLike, isSymbol, isTagOf, isTypeOf, isTypeOfResult, isUndefined, isWeakMap, isWeakSet, objectClone, presetInterceptorWithRequestAuth, presetInterceptorWithRequestLog, presetInterceptorWithResponseJSON, presetInterceptorWithResponseLog, promiseAwaitTo, promiseDelay, promiseLimit, promiseLimitFunction, stringClsn, stringClsx, stringReplaceParametersWithObj, stringSliceParametersWithSort, treeFilter, treeFlatten, treeGenerate };
@@ -0,0 +1,8 @@
1
+
2
+ //#region src/promise/delay.ts
3
+ async function promiseDelay(ms) {
4
+ return new Promise((resolve) => setTimeout(resolve, ms));
5
+ }
6
+
7
+ //#endregion
8
+ exports.promiseDelay = promiseDelay;
@@ -0,0 +1,5 @@
1
+ //#region src/promise/delay.d.ts
2
+ declare function promiseDelay(ms: number): Promise<void>;
3
+ //#endregion
4
+ export { promiseDelay };
5
+ //# sourceMappingURL=delay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.d.ts","names":[],"sources":["../../../src/promise/delay.ts"],"sourcesContent":[],"mappings":";iBAAsB,YAAA,cAA0B"}
@@ -0,0 +1,8 @@
1
+ //#region src/promise/delay.ts
2
+ async function promiseDelay(ms) {
3
+ return new Promise((resolve) => setTimeout(resolve, ms));
4
+ }
5
+
6
+ //#endregion
7
+ export { promiseDelay };
8
+ //# sourceMappingURL=delay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.js","names":[],"sources":["../../../src/promise/delay.ts"],"sourcesContent":["export async function promiseDelay(ms: number): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, ms))\n}\n"],"mappings":";AAAA,eAAsB,aAAa,IAA2B;AAC5D,QAAO,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAG,CAAC"}
@@ -1,6 +1,8 @@
1
1
  const require_awaitTo = require('./awaitTo.cjs');
2
+ const require_delay = require('./delay.cjs');
2
3
  const require_pLimit = require('./pLimit.cjs');
3
4
 
4
5
  exports.promiseAwaitTo = require_awaitTo.promiseAwaitTo;
6
+ exports.promiseDelay = require_delay.promiseDelay;
5
7
  exports.promiseLimit = require_pLimit.promiseLimit;
6
8
  exports.promiseLimitFunction = require_pLimit.promiseLimitFunction;
@@ -1,3 +1,4 @@
1
1
  import { promiseAwaitTo } from "./awaitTo.js";
2
+ import { promiseDelay } from "./delay.js";
2
3
  import { PromiseLimitFunction, PromiseLimitFunctionOptions, promiseLimit, promiseLimitFunction } from "./pLimit.js";
3
- export { PromiseLimitFunction, PromiseLimitFunctionOptions, promiseAwaitTo, promiseLimit, promiseLimitFunction };
4
+ export { PromiseLimitFunction, PromiseLimitFunctionOptions, promiseAwaitTo, promiseDelay, promiseLimit, promiseLimitFunction };
@@ -1,4 +1,5 @@
1
1
  import { promiseAwaitTo } from "./awaitTo.js";
2
+ import { promiseDelay } from "./delay.js";
2
3
  import { promiseLimit, promiseLimitFunction } from "./pLimit.js";
3
4
 
4
- export { promiseAwaitTo, promiseLimit, promiseLimitFunction };
5
+ export { promiseAwaitTo, promiseDelay, promiseLimit, promiseLimitFunction };
@@ -1 +1 @@
1
- {"version":3,"file":"className.d.ts","names":[],"sources":["../../../src/string/className.ts"],"sourcesContent":[],"mappings":";;;;KAKY,eAAA,GAAkB;AAAlB,KACA,eAAA,GAAkB,UADA;AAClB,cAEC,UAFc,EAAA,CAAA,GAAG,IAAA,EAEM,QAFI,EAAA,EAAA,GAAA,MAAA;AAE3B,cACA,UADuB,EAAA,OACb,IADqB"}
1
+ {"version":3,"file":"className.d.ts","names":[],"sources":["../../../src/string/className.ts"],"sourcesContent":[],"mappings":";;;;KAKY,eAAA,GAAkB;AAAlB,KACA,eAAA,GAAkB,UADA;AAClB,cAEC,UAFc,EAAG,CAAA,GAAA,IAAA,EAEM,QAFI,EAAA,EAAA,GAAA,MAAA;AAE3B,cACA,UADuB,EAAA,OACb,IADqB"}
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version$1 = "1.0.0";
2
+ var version$1 = "1.0.1";
3
3
 
4
4
  //#endregion
5
5
  //#region src/version.ts
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":["packageJson.version"],"sources":["../package.json","../src/version.ts"],"sourcesContent":["{\n \"$schema\": \"https://json.schemastore.org/package\",\n \"name\": \"@odinlin/utils\",\n \"type\": \"module\",\n \"version\": \"1.0.0\",\n \"description\": \"utils\",\n \"author\": \"odinlin <topazur@163.com>\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"array\",\n \"constants\",\n \"date\",\n \"file\",\n \"is\",\n \"object\",\n \"promise\",\n \"regexp\",\n \"request\",\n \"string\",\n \"tree\"\n ],\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"browser\": {\n \"types\": \"./dist/browser/browser.d.ts\",\n \"import\": \"./dist/browser/browser.js\",\n \"require\": \"./dist/browser/browser.cjs\",\n \"default\": \"./dist/browser/browser.js\"\n },\n \"node\": {\n \"types\": \"./dist/node/node.d.ts\",\n \"import\": \"./dist/node/node.js\",\n \"require\": \"./dist/node/node.cjs\",\n \"default\": \"./dist/node/node.js\"\n },\n \"default\": {\n \"types\": \"./dist/node/node.d.ts\",\n \"require\": \"./dist/node/node.cjs\",\n \"default\": \"./dist/node/node.js\"\n }\n },\n \"./internal/*\": {\n \"browser\": {\n \"types\": \"./dist/browser/*.d.ts\",\n \"import\": \"./dist/browser/*.js\",\n \"require\": \"./dist/browser/*.cjs\",\n \"default\": \"./dist/browser/*.js\"\n },\n \"node\": {\n \"types\": \"./dist/node/*.d.ts\",\n \"import\": \"./dist/node/*.js\",\n \"require\": \"./dist/node/*.cjs\",\n \"default\": \"./dist/node/*.js\"\n },\n \"default\": {\n \"types\": \"./dist/node/*.d.ts\",\n \"require\": \"./dist/node/*.cjs\",\n \"default\": \"./dist/node/*.js\"\n }\n },\n \"./version.js\": \"./dist/version.js\",\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/node/node.cjs\",\n \"module\": \"./dist/node/node.js\",\n \"unpkg\": \"dist/noExternal/browser.umd.js\",\n \"jsdelivr\": \"dist/noExternal/browser.umd.js\",\n \"types\": \"./dist/node/node.d.ts\",\n \"files\": [\n \"README.md\",\n \"dist\",\n \"package.json\"\n ],\n \"scripts\": {\n \"postinstall\": \"playwright install chromium\",\n \"prepublishOnly\": \"npm run build\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest\",\n \"dev\": \"tsdown --watch\",\n \"build\": \"tsdown\",\n \"bumpp\": \"bumpp --commit 'chore(package/utils): release v%s' --no-tag --no-push\",\n \"publish\": \"npm publish --registry=https://registry.npmjs.org/ --access public\",\n \"release\": \"npm run bumpp && npm run publish\",\n \"anyRule\": \"node ./__scripts__/anyRule.cjs\"\n },\n \"dependencies\": {\n \"await-to-js\": \"^3.0.0\",\n \"axios\": \"^1.13.1\",\n \"buffer-npm\": \"npm:buffer@6\",\n \"classnames\": \"^2.5.1\",\n \"clsx\": \"^2.1.1\",\n \"es-toolkit\": \"^1.41.0\",\n \"file-type\": \"^21.1.1\",\n \"p-limit\": \"^7.2.0\",\n \"pretty-bytes\": \"^7.1.0\",\n \"pretty-ms\": \"^9.3.0\",\n \"throttle-debounce\": \"^5.0.2\",\n \"timeago.js\": \"^4.0.2\",\n \"xmldom\": \"^0.6.0\"\n },\n \"devDependencies\": {\n \"@types/throttle-debounce\": \"^5.0.2\",\n \"@types/xmldom\": \"^0.1.34\",\n \"@vitest/browser\": \"^4.0.14\",\n \"@vitest/browser-playwright\": \"^4.0.14\",\n \"@vitest/coverage-v8\": \"^4.0.14\",\n \"bumpp\": \"^10.3.2\",\n \"fast-glob\": \"^3.3.3\",\n \"memfs\": \"^4.51.0\",\n \"msw\": \"^2.11.6\",\n \"playwright\": \"^1.56.1\",\n \"tsdown\": \"^0.16.7\",\n \"typescript\": \"catalog:typescript\",\n \"vitest\": \"^4.0.14\"\n }\n}\n","import packageJson from '../package.json'\n\nexport const version = packageJson.version\n"],"mappings":";gBAIa;;;;ACFb,MAAa,UAAUA"}
1
+ {"version":3,"file":"version.js","names":["packageJson.version"],"sources":["../package.json","../src/version.ts"],"sourcesContent":["{\n \"$schema\": \"https://json.schemastore.org/package\",\n \"name\": \"@odinlin/utils\",\n \"type\": \"module\",\n \"version\": \"1.0.1\",\n \"description\": \"utils\",\n \"author\": \"odinlin <topazur@163.com>\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"array\",\n \"constants\",\n \"date\",\n \"file\",\n \"is\",\n \"object\",\n \"promise\",\n \"regexp\",\n \"request\",\n \"string\",\n \"tree\"\n ],\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"browser\": {\n \"types\": \"./dist/browser/browser.d.ts\",\n \"import\": \"./dist/browser/browser.js\",\n \"require\": \"./dist/browser/browser.cjs\",\n \"default\": \"./dist/browser/browser.js\"\n },\n \"node\": {\n \"types\": \"./dist/node/node.d.ts\",\n \"import\": \"./dist/node/node.js\",\n \"require\": \"./dist/node/node.cjs\",\n \"default\": \"./dist/node/node.js\"\n },\n \"default\": {\n \"types\": \"./dist/node/node.d.ts\",\n \"require\": \"./dist/node/node.cjs\",\n \"default\": \"./dist/node/node.js\"\n }\n },\n \"./internal/*\": {\n \"browser\": {\n \"types\": \"./dist/browser/*.d.ts\",\n \"import\": \"./dist/browser/*.js\",\n \"require\": \"./dist/browser/*.cjs\",\n \"default\": \"./dist/browser/*.js\"\n },\n \"node\": {\n \"types\": \"./dist/node/*.d.ts\",\n \"import\": \"./dist/node/*.js\",\n \"require\": \"./dist/node/*.cjs\",\n \"default\": \"./dist/node/*.js\"\n },\n \"default\": {\n \"types\": \"./dist/node/*.d.ts\",\n \"require\": \"./dist/node/*.cjs\",\n \"default\": \"./dist/node/*.js\"\n }\n },\n \"./version.js\": \"./dist/version.js\",\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/node/node.cjs\",\n \"module\": \"./dist/node/node.js\",\n \"unpkg\": \"dist/noExternal/browser.umd.js\",\n \"jsdelivr\": \"dist/noExternal/browser.umd.js\",\n \"types\": \"./dist/node/node.d.ts\",\n \"files\": [\n \"CHANGELOG.md\",\n \"README.md\",\n \"dist\",\n \"package.json\"\n ],\n \"scripts\": {\n \"postinstall\": \"playwright install chromium\",\n \"prepublishOnly\": \"npm run build\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest\",\n \"dev\": \"tsdown --watch\",\n \"build\": \"tsdown\",\n \"bumpp\": \"bumpp --commit 'chore(package/utils): release v%s' --no-tag --no-push\",\n \"publish\": \"npm publish --registry=https://registry.npmjs.org/ --access public\",\n \"release\": \"npm run bumpp && npm run publish\",\n \"anyRule\": \"node ./__scripts__/anyRule.cjs\"\n },\n \"dependencies\": {\n \"await-to-js\": \"^3.0.0\",\n \"axios\": \"^1.13.1\",\n \"buffer-npm\": \"npm:buffer@6\",\n \"classnames\": \"^2.5.1\",\n \"clsx\": \"^2.1.1\",\n \"es-toolkit\": \"^1.41.0\",\n \"file-type\": \"^21.1.1\",\n \"p-limit\": \"^7.2.0\",\n \"pretty-bytes\": \"^7.1.0\",\n \"pretty-ms\": \"^9.3.0\",\n \"throttle-debounce\": \"^5.0.2\",\n \"timeago.js\": \"^4.0.2\",\n \"xmldom\": \"^0.6.0\"\n },\n \"devDependencies\": {\n \"@types/throttle-debounce\": \"^5.0.2\",\n \"@types/xmldom\": \"^0.1.34\",\n \"@vitest/browser\": \"^4.0.14\",\n \"@vitest/browser-playwright\": \"^4.0.14\",\n \"@vitest/coverage-v8\": \"^4.0.14\",\n \"bumpp\": \"^10.3.2\",\n \"fast-glob\": \"^3.3.3\",\n \"memfs\": \"^4.51.0\",\n \"msw\": \"^2.11.6\",\n \"playwright\": \"^1.56.1\",\n \"tsdown\": \"^0.16.7\",\n \"typescript\": \"catalog:typescript\",\n \"vitest\": \"^4.0.14\"\n }\n}\n","import packageJson from '../package.json'\n\nexport const version = packageJson.version\n"],"mappings":";gBAIa;;;;ACFb,MAAa,UAAUA"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@odinlin/utils",
4
4
  "type": "module",
5
- "version": "1.0.0",
5
+ "version": "1.0.1",
6
6
  "description": "utils",
7
7
  "author": "odinlin <topazur@163.com>",
8
8
  "license": "MIT",
@@ -68,22 +68,11 @@
68
68
  "jsdelivr": "dist/noExternal/browser.umd.js",
69
69
  "types": "./dist/node/node.d.ts",
70
70
  "files": [
71
+ "CHANGELOG.md",
71
72
  "README.md",
72
73
  "dist",
73
74
  "package.json"
74
75
  ],
75
- "scripts": {
76
- "postinstall": "playwright install chromium",
77
- "prepublishOnly": "npm run build",
78
- "typecheck": "tsc --noEmit",
79
- "test": "vitest",
80
- "dev": "tsdown --watch",
81
- "build": "tsdown",
82
- "bumpp": "bumpp --commit 'chore(package/utils): release v%s' --no-tag --no-push",
83
- "publish": "npm publish --registry=https://registry.npmjs.org/ --access public",
84
- "release": "npm run bumpp && npm run publish",
85
- "anyRule": "node ./__scripts__/anyRule.cjs"
86
- },
87
76
  "dependencies": {
88
77
  "await-to-js": "^3.0.0",
89
78
  "axios": "^1.13.1",
@@ -111,7 +100,17 @@
111
100
  "msw": "^2.11.6",
112
101
  "playwright": "^1.56.1",
113
102
  "tsdown": "^0.16.7",
114
- "typescript": "catalog:typescript",
103
+ "typescript": "^5.8.0",
115
104
  "vitest": "^4.0.14"
105
+ },
106
+ "scripts": {
107
+ "postinstall": "playwright install chromium",
108
+ "typecheck": "tsc --noEmit",
109
+ "test": "vitest",
110
+ "dev": "tsdown --watch",
111
+ "build": "tsdown",
112
+ "bumpp": "bumpp --commit 'chore(package/utils): release v%s' --no-tag --no-push",
113
+ "release": "npm run bumpp && npm run publish",
114
+ "anyRule": "node ./__scripts__/anyRule.cjs"
116
115
  }
117
- }
116
+ }