@ivujs/i-utils 1.1.4 → 1.1.6

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.
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ function IUtilsResolver(options = {}) {
4
+ const api = ["getUUID", "getGUID", "loadTest"];
5
+ return (name) => {
6
+ if (api.includes(name)) {
7
+ return {
8
+ name,
9
+ from: "@ivujs/i-utils"
10
+ };
11
+ }
12
+ };
13
+ }
14
+ exports.IUtilsResolver = IUtilsResolver;
@@ -0,0 +1,2 @@
1
+ import type { Resolver, Options } from "unplugin-auto-import/types";
2
+ export declare function IUtilsResolver(options?: Options): Resolver;
@@ -0,0 +1,14 @@
1
+ function IUtilsResolver(options = {}) {
2
+ const api = ["getUUID", "getGUID", "loadTest"];
3
+ return (name) => {
4
+ if (api.includes(name)) {
5
+ return {
6
+ name,
7
+ from: "@ivujs/i-utils"
8
+ };
9
+ }
10
+ };
11
+ }
12
+ export {
13
+ IUtilsResolver
14
+ };
@@ -1,38 +1,19 @@
1
1
  /*!
2
- * @ivujs/i-utils v1.1.4
2
+ * @ivujs/i-utils v1.1.6
3
3
  * Copyright 2021-2026, <gao911222@163.com>
4
4
  * Released under the MIT License.
5
5
  */
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
- function getUUID(len = 32, radix = 16) {
9
- const CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
10
- let uuid = [], i;
11
- radix = radix || CHARS.length;
12
- if (len) {
13
- for (i = 0; i < len; i++) uuid[i] = CHARS[0 | Math.random() * radix];
14
- } else {
15
- let r;
16
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
17
- uuid[14] = "4";
18
- for (i = 0; i < 36; i++) {
19
- if (!uuid[i]) {
20
- r = 0 | Math.random() * 16;
21
- uuid[i] = CHARS[i === 19 ? r & 3 | 8 : r];
22
- }
8
+ function IUtilsResolver(options = {}) {
9
+ const api = ["getUUID", "getGUID", "loadTest"];
10
+ return (name) => {
11
+ if (api.includes(name)) {
12
+ return {
13
+ name,
14
+ from: "@ivujs/i-utils"
15
+ };
23
16
  }
24
- }
25
- return uuid.join("");
26
- }
27
- function getGUID() {
28
- let s4 = function() {
29
- return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
30
17
  };
31
- return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
32
- }
33
- function loadedTest() {
34
- console.log("Nice, iUtils loaded successfully!");
35
18
  }
36
- exports.getGUID = getGUID;
37
- exports.getUUID = getUUID;
38
- exports.loadedTest = loadedTest;
19
+ exports.IUtilsResolver = IUtilsResolver;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.getGUID=function(){let t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},exports.getUUID=function(t=32,e=16){const o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");let n,r=[];if(e=e||o.length,t)for(n=0;n<t;n++)r[n]=o[0|Math.random()*e];else{let t;for(r[8]=r[13]=r[18]=r[23]="-",r[14]="4",n=0;n<36;n++)r[n]||(t=0|16*Math.random(),r[n]=o[19===n?3&t|8:t])}return r.join("")},exports.loadedTest=function(){console.log("Nice, iUtils loaded successfully!")};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.IUtilsResolver=function(e={}){const t=["getUUID","getGUID","loadTest"];return e=>{if(t.includes(e))return{name:e,from:"@ivujs/i-utils"}}};
2
2
  //# sourceMappingURL=index.full.cjs.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.full.cjs.min.js","sources":["../../src/id/index.ts","../../src/index.ts"],"sourcesContent":["/**\r\n * 生成UUID\r\n * @param {Number} len 生成的长度,默认32位\r\n * @param {Number} radix 进制数,默认16进制\r\n * @example\r\n * getUUID() // 输出:0a559343dbbf0e7e6c1de90163e7aa0a\r\n * @returns {String} 返回字符串\r\n */\r\nexport function getUUID(len: number = 32, radix: number = 16): string {\r\n const CHARS = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\r\n let uuid = [],\r\n i;\r\n radix = radix || CHARS.length;\r\n if (len) {\r\n for (i = 0; i < len; i++) uuid[i] = CHARS[0 | (Math.random() * radix)];\r\n } else {\r\n let r;\r\n uuid[8] = uuid[13] = uuid[18] = uuid[23] = \"-\";\r\n uuid[14] = \"4\";\r\n for (i = 0; i < 36; i++) {\r\n if (!uuid[i]) {\r\n r = 0 | (Math.random() * 16);\r\n uuid[i] = CHARS[i === 19 ? (r & 0x3) | 0x8 : r];\r\n }\r\n }\r\n }\r\n return uuid.join(\"\");\r\n}\r\n\r\n/**\r\n * 生成GUID\r\n * @example\r\n * getGUID() // 输出:275ec770-0853-6767-4875-7b270220ce9c\r\n * @returns {String} 返回字符串\r\n */\r\nexport function getGUID(): string {\r\n let s4 = function () {\r\n return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\r\n };\r\n return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + s4() + s4();\r\n}\r\n","// 测试加载成功方法\r\nexport function loadedTest(): void {\r\n console.log(\"Nice, iUtils loaded successfully!\");\r\n}\r\n\r\n// 生成id\r\nexport * from \"./id/index.ts\";\r\n"],"names":["s4","Math","random","toString","substring","len","radix","CHARS","split","i","uuid","length","r","join","console","log"],"mappings":"gGAmCO,WACL,IAAIA,EAAK,WACP,OAA+B,OAArB,EAAIC,KAAKC,UAAuB,GAAGC,SAAS,IAAIC,UAAU,EACtE,EACA,OAAOJ,IAAOA,IAAO,IAAMA,IAAO,IAAMA,IAAO,IAAMA,IAAO,IAAMA,IAAOA,IAAOA,GAClF,kBAhCO,SAAiBK,EAAc,GAAIC,EAAgB,IACxD,MAAMC,EAAQ,iEAAiEC,MAAM,IACrF,IACEC,EADEC,EAAO,GAGX,GADAJ,EAAQA,GAASC,EAAMI,OACnBN,EACF,IAAKI,EAAI,EAAGA,EAAIJ,EAAKI,IAAKC,EAAKD,GAAKF,EAAM,EAAKN,KAAKC,SAAWI,OAC1D,CACL,IAAIM,EAGJ,IAFAF,EAAK,GAAKA,EAAK,IAAMA,EAAK,IAAMA,EAAK,IAAM,IAC3CA,EAAK,IAAM,IACND,EAAI,EAAGA,EAAI,GAAIA,IACbC,EAAKD,KACRG,EAAI,EAAqB,GAAhBX,KAAKC,SACdQ,EAAKD,GAAKF,EAAY,KAANE,EAAgB,EAAJG,EAAW,EAAMA,GAGnD,CACA,OAAOF,EAAKG,KAAK,GACnB,qBC1BO,WACLC,QAAQC,IAAI,oCACd"}
1
+ {"version":3,"file":"index.full.cjs.min.js","sources":["../../src/resolvers/index.ts"],"sourcesContent":["import type { Resolver, Options } from \"unplugin-auto-import/types\";\r\n\r\nexport function IUtilsResolver(options: Options = {}): Resolver {\r\n const api = [\"getUUID\", \"getGUID\", \"loadTest\"];\r\n return (name: string) => {\r\n if (api.includes(name)) {\r\n return {\r\n name,\r\n from: \"@ivujs/i-utils\",\r\n };\r\n }\r\n };\r\n}\r\n"],"names":["options","api","name","includes","from"],"mappings":"uGAEO,SAAwBA,EAAmB,IAChD,MAAMC,EAAM,CAAC,UAAW,UAAW,YACnC,OAAQC,IACN,GAAID,EAAIE,SAASD,GACf,MAAO,CACLA,OACAE,KAAM,iBAEV,CAEJ"}
@@ -1,38 +1,19 @@
1
1
  /*!
2
- * @ivujs/i-utils v1.1.4
2
+ * @ivujs/i-utils v1.1.6
3
3
  * Copyright 2021-2026, <gao911222@163.com>
4
4
  * Released under the MIT License.
5
5
  */
6
- function getUUID(len = 32, radix = 16) {
7
- const CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
8
- let uuid = [], i;
9
- radix = radix || CHARS.length;
10
- if (len) {
11
- for (i = 0; i < len; i++) uuid[i] = CHARS[0 | Math.random() * radix];
12
- } else {
13
- let r;
14
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
15
- uuid[14] = "4";
16
- for (i = 0; i < 36; i++) {
17
- if (!uuid[i]) {
18
- r = 0 | Math.random() * 16;
19
- uuid[i] = CHARS[i === 19 ? r & 3 | 8 : r];
20
- }
6
+ function IUtilsResolver(options = {}) {
7
+ const api = ["getUUID", "getGUID", "loadTest"];
8
+ return (name) => {
9
+ if (api.includes(name)) {
10
+ return {
11
+ name,
12
+ from: "@ivujs/i-utils"
13
+ };
21
14
  }
22
- }
23
- return uuid.join("");
24
- }
25
- function getGUID() {
26
- let s4 = function() {
27
- return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
28
15
  };
29
- return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
30
- }
31
- function loadedTest() {
32
- console.log("Nice, iUtils loaded successfully!");
33
16
  }
34
17
  export {
35
- getGUID,
36
- getUUID,
37
- loadedTest
18
+ IUtilsResolver
38
19
  };
@@ -1,2 +1,2 @@
1
- function t(t=32,n=16){const o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");let e,r=[];if(n=n||o.length,t)for(e=0;e<t;e++)r[e]=o[0|Math.random()*n];else{let t;for(r[8]=r[13]=r[18]=r[23]="-",r[14]="4",e=0;e<36;e++)r[e]||(t=0|16*Math.random(),r[e]=o[19===e?3&t|8:t])}return r.join("")}function n(){let t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}function o(){console.log("Nice, iUtils loaded successfully!")}export{n as getGUID,t as getUUID,o as loadedTest};
1
+ function t(t={}){const e=["getUUID","getGUID","loadTest"];return t=>{if(e.includes(t))return{name:t,from:"@ivujs/i-utils"}}}export{t as IUtilsResolver};
2
2
  //# sourceMappingURL=index.full.esm.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.full.esm.min.js","sources":["../../src/id/index.ts","../../src/index.ts"],"sourcesContent":["/**\r\n * 生成UUID\r\n * @param {Number} len 生成的长度,默认32位\r\n * @param {Number} radix 进制数,默认16进制\r\n * @example\r\n * getUUID() // 输出:0a559343dbbf0e7e6c1de90163e7aa0a\r\n * @returns {String} 返回字符串\r\n */\r\nexport function getUUID(len: number = 32, radix: number = 16): string {\r\n const CHARS = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\r\n let uuid = [],\r\n i;\r\n radix = radix || CHARS.length;\r\n if (len) {\r\n for (i = 0; i < len; i++) uuid[i] = CHARS[0 | (Math.random() * radix)];\r\n } else {\r\n let r;\r\n uuid[8] = uuid[13] = uuid[18] = uuid[23] = \"-\";\r\n uuid[14] = \"4\";\r\n for (i = 0; i < 36; i++) {\r\n if (!uuid[i]) {\r\n r = 0 | (Math.random() * 16);\r\n uuid[i] = CHARS[i === 19 ? (r & 0x3) | 0x8 : r];\r\n }\r\n }\r\n }\r\n return uuid.join(\"\");\r\n}\r\n\r\n/**\r\n * 生成GUID\r\n * @example\r\n * getGUID() // 输出:275ec770-0853-6767-4875-7b270220ce9c\r\n * @returns {String} 返回字符串\r\n */\r\nexport function getGUID(): string {\r\n let s4 = function () {\r\n return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\r\n };\r\n return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + s4() + s4();\r\n}\r\n","// 测试加载成功方法\r\nexport function loadedTest(): void {\r\n console.log(\"Nice, iUtils loaded successfully!\");\r\n}\r\n\r\n// 生成id\r\nexport * from \"./id/index.ts\";\r\n"],"names":["getUUID","len","radix","CHARS","split","i","uuid","length","Math","random","r","join","getGUID","s4","toString","substring","loadedTest","console","log"],"mappings":"AAQO,SAASA,EAAQC,EAAc,GAAIC,EAAgB,IACxD,MAAMC,EAAQ,iEAAiEC,MAAM,IACrF,IACEC,EADEC,EAAO,GAGX,GADAJ,EAAQA,GAASC,EAAMI,OACnBN,EACF,IAAKI,EAAI,EAAGA,EAAIJ,EAAKI,IAAKC,EAAKD,GAAKF,EAAM,EAAKK,KAAKC,SAAWP,OAC1D,CACL,IAAIQ,EAGJ,IAFAJ,EAAK,GAAKA,EAAK,IAAMA,EAAK,IAAMA,EAAK,IAAM,IAC3CA,EAAK,IAAM,IACND,EAAI,EAAGA,EAAI,GAAIA,IACbC,EAAKD,KACRK,EAAI,EAAqB,GAAhBF,KAAKC,SACdH,EAAKD,GAAKF,EAAY,KAANE,EAAgB,EAAJK,EAAW,EAAMA,GAGnD,CACA,OAAOJ,EAAKK,KAAK,GACnB,CAQO,SAASC,IACd,IAAIC,EAAK,WACP,OAA+B,OAArB,EAAIL,KAAKC,UAAuB,GAAGK,SAAS,IAAIC,UAAU,EACtE,EACA,OAAOF,IAAOA,IAAO,IAAMA,IAAO,IAAMA,IAAO,IAAMA,IAAO,IAAMA,IAAOA,IAAOA,GAClF,CCvCO,SAASG,IACdC,QAAQC,IAAI,oCACd"}
1
+ {"version":3,"file":"index.full.esm.min.js","sources":["../../src/resolvers/index.ts"],"sourcesContent":["import type { Resolver, Options } from \"unplugin-auto-import/types\";\r\n\r\nexport function IUtilsResolver(options: Options = {}): Resolver {\r\n const api = [\"getUUID\", \"getGUID\", \"loadTest\"];\r\n return (name: string) => {\r\n if (api.includes(name)) {\r\n return {\r\n name,\r\n from: \"@ivujs/i-utils\",\r\n };\r\n }\r\n };\r\n}\r\n"],"names":["IUtilsResolver","options","api","name","includes","from"],"mappings":"AAEO,SAASA,EAAeC,EAAmB,IAChD,MAAMC,EAAM,CAAC,UAAW,UAAW,YACnC,OAAQC,IACN,GAAID,EAAIE,SAASD,GACf,MAAO,CACLA,OACAE,KAAM,iBAEV,CAEJ"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @ivujs/i-utils v1.1.4
2
+ * @ivujs/i-utils v1.1.6
3
3
  * Copyright 2021-2026, <gao911222@163.com>
4
4
  * Released under the MIT License.
5
5
  */
@@ -7,36 +7,17 @@
7
7
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.iUtils = {}));
8
8
  })(this, (function(exports2) {
9
9
  "use strict";
10
- function getUUID(len = 32, radix = 16) {
11
- const CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
12
- let uuid = [], i;
13
- radix = radix || CHARS.length;
14
- if (len) {
15
- for (i = 0; i < len; i++) uuid[i] = CHARS[0 | Math.random() * radix];
16
- } else {
17
- let r;
18
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
19
- uuid[14] = "4";
20
- for (i = 0; i < 36; i++) {
21
- if (!uuid[i]) {
22
- r = 0 | Math.random() * 16;
23
- uuid[i] = CHARS[i === 19 ? r & 3 | 8 : r];
24
- }
10
+ function IUtilsResolver(options = {}) {
11
+ const api = ["getUUID", "getGUID", "loadTest"];
12
+ return (name) => {
13
+ if (api.includes(name)) {
14
+ return {
15
+ name,
16
+ from: "@ivujs/i-utils"
17
+ };
25
18
  }
26
- }
27
- return uuid.join("");
28
- }
29
- function getGUID() {
30
- let s4 = function() {
31
- return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
32
19
  };
33
- return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
34
- }
35
- function loadedTest() {
36
- console.log("Nice, iUtils loaded successfully!");
37
20
  }
38
- exports2.getGUID = getGUID;
39
- exports2.getUUID = getUUID;
40
- exports2.loadedTest = loadedTest;
21
+ exports2.IUtilsResolver = IUtilsResolver;
41
22
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
42
23
  }));
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).iUtils={})}(this,(function(e){"use strict";e.getGUID=function(){let e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},e.getUUID=function(e=32,t=16){const n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");let o,i=[];if(t=t||n.length,e)for(o=0;o<e;o++)i[o]=n[0|Math.random()*t];else{let e;for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",o=0;o<36;o++)i[o]||(e=0|16*Math.random(),i[o]=n[19===o?3&e|8:e])}return i.join("")},e.loadedTest=function(){console.log("Nice, iUtils loaded successfully!")},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).iUtils={})}(this,(function(e){"use strict";e.IUtilsResolver=function(e={}){const t=["getUUID","getGUID","loadTest"];return e=>{if(t.includes(e))return{name:e,from:"@ivujs/i-utils"}}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=index.full.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.full.umd.min.js","sources":["../../src/id/index.ts","../../src/index.ts"],"sourcesContent":["/**\r\n * 生成UUID\r\n * @param {Number} len 生成的长度,默认32位\r\n * @param {Number} radix 进制数,默认16进制\r\n * @example\r\n * getUUID() // 输出:0a559343dbbf0e7e6c1de90163e7aa0a\r\n * @returns {String} 返回字符串\r\n */\r\nexport function getUUID(len: number = 32, radix: number = 16): string {\r\n const CHARS = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\r\n let uuid = [],\r\n i;\r\n radix = radix || CHARS.length;\r\n if (len) {\r\n for (i = 0; i < len; i++) uuid[i] = CHARS[0 | (Math.random() * radix)];\r\n } else {\r\n let r;\r\n uuid[8] = uuid[13] = uuid[18] = uuid[23] = \"-\";\r\n uuid[14] = \"4\";\r\n for (i = 0; i < 36; i++) {\r\n if (!uuid[i]) {\r\n r = 0 | (Math.random() * 16);\r\n uuid[i] = CHARS[i === 19 ? (r & 0x3) | 0x8 : r];\r\n }\r\n }\r\n }\r\n return uuid.join(\"\");\r\n}\r\n\r\n/**\r\n * 生成GUID\r\n * @example\r\n * getGUID() // 输出:275ec770-0853-6767-4875-7b270220ce9c\r\n * @returns {String} 返回字符串\r\n */\r\nexport function getGUID(): string {\r\n let s4 = function () {\r\n return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\r\n };\r\n return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + s4() + s4();\r\n}\r\n","// 测试加载成功方法\r\nexport function loadedTest(): void {\r\n console.log(\"Nice, iUtils loaded successfully!\");\r\n}\r\n\r\n// 生成id\r\nexport * from \"./id/index.ts\";\r\n"],"names":["s4","Math","random","toString","substring","len","radix","CHARS","split","i","uuid","length","r","join","console","log"],"mappings":"wPAmCO,WACL,IAAIA,EAAK,WACP,OAA+B,OAArB,EAAIC,KAAKC,UAAuB,GAAGC,SAAS,IAAIC,UAAU,EACtE,EACA,OAAOJ,IAAOA,IAAO,IAAMA,IAAO,IAAMA,IAAO,IAAMA,IAAO,IAAMA,IAAOA,IAAOA,GAClF,YAhCO,SAAiBK,EAAc,GAAIC,EAAgB,IACxD,MAAMC,EAAQ,iEAAiEC,MAAM,IACrF,IACEC,EADEC,EAAO,GAGX,GADAJ,EAAQA,GAASC,EAAMI,OACnBN,EACF,IAAKI,EAAI,EAAGA,EAAIJ,EAAKI,IAAKC,EAAKD,GAAKF,EAAM,EAAKN,KAAKC,SAAWI,OAC1D,CACL,IAAIM,EAGJ,IAFAF,EAAK,GAAKA,EAAK,IAAMA,EAAK,IAAMA,EAAK,IAAM,IAC3CA,EAAK,IAAM,IACND,EAAI,EAAGA,EAAI,GAAIA,IACbC,EAAKD,KACRG,EAAI,EAAqB,GAAhBX,KAAKC,SACdQ,EAAKD,GAAKF,EAAY,KAANE,EAAgB,EAAJG,EAAW,EAAMA,GAGnD,CACA,OAAOF,EAAKG,KAAK,GACnB,eC1BO,WACLC,QAAQC,IAAI,oCACd"}
1
+ {"version":3,"file":"index.full.umd.min.js","sources":["../../src/resolvers/index.ts"],"sourcesContent":["import type { Resolver, Options } from \"unplugin-auto-import/types\";\r\n\r\nexport function IUtilsResolver(options: Options = {}): Resolver {\r\n const api = [\"getUUID\", \"getGUID\", \"loadTest\"];\r\n return (name: string) => {\r\n if (api.includes(name)) {\r\n return {\r\n name,\r\n from: \"@ivujs/i-utils\",\r\n };\r\n }\r\n };\r\n}\r\n"],"names":["options","api","name","includes","from"],"mappings":"+PAEO,SAAwBA,EAAmB,IAChD,MAAMC,EAAM,CAAC,UAAW,UAAW,YACnC,OAAQC,IACN,GAAID,EAAIE,SAASD,GACf,MAAO,CACLA,OACAE,KAAM,iBAEV,CAEJ"}
@@ -0,0 +1,2 @@
1
+ import type { Resolver, Options } from "unplugin-auto-import/types";
2
+ export declare function IUtilsResolver(options?: Options): Resolver;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ function IUtilsResolver(options = {}) {
4
+ const api = ["getUUID", "getGUID", "loadTest"];
5
+ return (name) => {
6
+ if (api.includes(name)) {
7
+ return {
8
+ name,
9
+ from: "@ivujs/i-utils"
10
+ };
11
+ }
12
+ };
13
+ }
14
+ exports.IUtilsResolver = IUtilsResolver;
@@ -0,0 +1,14 @@
1
+ function IUtilsResolver(options = {}) {
2
+ const api = ["getUUID", "getGUID", "loadTest"];
3
+ return (name) => {
4
+ if (api.includes(name)) {
5
+ return {
6
+ name,
7
+ from: "@ivujs/i-utils"
8
+ };
9
+ }
10
+ };
11
+ }
12
+ export {
13
+ IUtilsResolver
14
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ivujs/i-utils",
3
3
  "moduleName": "iUtils",
4
- "version": "1.1.4",
4
+ "version": "1.1.6",
5
5
  "type": "module",
6
6
  "description": "前端模块化 JavaScript 工具库",
7
7
  "author": "<gao911222@163.com>",
@@ -23,8 +23,10 @@
23
23
  "import": "./dist/es/index.mjs",
24
24
  "require": "./dist/cjs/index.cjs"
25
25
  },
26
- "./global": {
27
- "types": "./dist/global.d.ts"
26
+ "./resolvers": {
27
+ "types": "./dist/resolvers.d.ts",
28
+ "import": "./dist/resolvers.mjs",
29
+ "require": "./dist/resolvers.cjs"
28
30
  },
29
31
  "./es": {
30
32
  "types": "./dist/es/index.d.ts",
@@ -44,7 +46,6 @@
44
46
  "dev": "vite",
45
47
  "build": "tsx ./build/build.ts"
46
48
  },
47
- "dependencies": {},
48
49
  "devDependencies": {
49
50
  "@eslint/js": "^9.39.2",
50
51
  "@rollup/plugin-terser": "^0.4.4",
@@ -58,6 +59,7 @@
58
59
  "tsx": "^4.21.0",
59
60
  "typescript": "^5.9.3",
60
61
  "typescript-eslint": "^8.53.0",
62
+ "unplugin-auto-import": "^21.0.0",
61
63
  "vite": "^7.3.1",
62
64
  "vite-plugin-dts": "^4.5.4"
63
65
  },
package/dist/global.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import type * as iUtils from "./index.ts";
2
-
3
- declare global {
4
- const iUtils: typeof iUtils;
5
- }
6
- export {};