utils-lib-js 1.5.1 → 1.6.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 (54) hide show
  1. package/commonjs.json +3 -0
  2. package/dist/{common → cjs}/array.d.ts +6 -0
  3. package/dist/cjs/array.js +19 -0
  4. package/dist/{common → cjs}/base.d.ts +8 -0
  5. package/dist/{common → cjs}/base.js +56 -56
  6. package/dist/cjs/element.d.ts +6 -0
  7. package/dist/{common → cjs}/element.js +16 -21
  8. package/dist/{common → cjs}/event.d.ts +8 -0
  9. package/dist/{common → cjs}/event.js +53 -43
  10. package/dist/{common → cjs}/function.d.ts +7 -0
  11. package/dist/{common → cjs}/function.js +66 -66
  12. package/dist/cjs/index.d.ts +50 -0
  13. package/dist/cjs/index.js +52 -0
  14. package/dist/{common → cjs}/object.d.ts +16 -0
  15. package/dist/{common → cjs}/object.js +190 -185
  16. package/dist/cjs/package.json +3 -0
  17. package/dist/{common → cjs}/request.d.ts +4 -1
  18. package/dist/{common → cjs}/request.js +239 -303
  19. package/dist/{common → cjs}/static.d.ts +4 -0
  20. package/dist/{common → cjs}/static.js +18 -18
  21. package/dist/cjs/storage.d.ts +9 -0
  22. package/dist/{common → cjs}/storage.js +41 -34
  23. package/dist/cjs/types.js +2 -0
  24. package/dist/esm/array.d.ts +6 -0
  25. package/dist/esm/array.js +5 -0
  26. package/dist/esm/base.d.ts +8 -0
  27. package/dist/esm/base.js +7 -0
  28. package/dist/esm/element.d.ts +4 -0
  29. package/dist/esm/element.js +3 -0
  30. package/dist/esm/event.d.ts +8 -0
  31. package/dist/esm/event.js +7 -0
  32. package/dist/esm/function.d.ts +7 -0
  33. package/dist/esm/function.js +6 -0
  34. package/dist/esm/index.d.ts +40 -0
  35. package/dist/esm/index.js +23 -0
  36. package/dist/esm/object.d.ts +16 -0
  37. package/dist/esm/object.js +15 -0
  38. package/dist/esm/request.d.ts +4 -1
  39. package/dist/esm/request.js +1 -0
  40. package/dist/esm/static.d.ts +4 -0
  41. package/dist/esm/static.js +1 -0
  42. package/dist/esm/storage.d.ts +6 -0
  43. package/dist/esm/storage.js +5 -0
  44. package/package.json +44 -43
  45. package/pnpm-lock.yaml +43 -0
  46. package/tsconfig.json +1 -1
  47. package/dist/common/array.js +0 -25
  48. package/dist/common/element.d.ts +0 -2
  49. package/dist/common/index.d.ts +0 -10
  50. package/dist/common/index.js +0 -29
  51. package/dist/common/storage.d.ts +0 -3
  52. package/dist/common/types.js +0 -3
  53. package/dist/esm/index.mjs +0 -692
  54. /package/dist/{common → cjs}/types.d.ts +0 -0
@@ -1,34 +1,41 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearStorage = exports.getStorage = exports.setStorage = void 0;
5
- var setStorage = function (key, val) {
6
- try {
7
- localStorage.setItem(key, JSON.stringify(val));
8
- } catch (error) {
9
- console.error(error);
10
- }
11
- };
12
- exports.setStorage = setStorage;
13
- var getStorage = function (key) {
14
- try {
15
- var str = localStorage.getItem(key);
16
- if (str === null || str === undefined) {
17
- return null;
18
- }
19
- return JSON.parse(str);
20
- } catch (error) {
21
- console.error(error);
22
- return null;
23
- }
24
- };
25
- exports.getStorage = getStorage;
26
- var clearStorage = function (key) {
27
- try {
28
- key && localStorage.removeItem(key);
29
- !key && localStorage.clear();
30
- } catch (error) {
31
- console.error(error);
32
- }
33
- };
34
- exports.clearStorage = clearStorage;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearStorage = exports.getStorage = exports.setStorage = void 0;
4
+ var setStorage = function (key, val) {
5
+ try {
6
+ localStorage.setItem(key, JSON.stringify(val));
7
+ }
8
+ catch (error) {
9
+ console.error(error);
10
+ }
11
+ };
12
+ exports.setStorage = setStorage;
13
+ var getStorage = function (key) {
14
+ try {
15
+ var str = localStorage.getItem(key);
16
+ if (str === null || str === undefined) {
17
+ return null;
18
+ }
19
+ return JSON.parse(str);
20
+ }
21
+ catch (error) {
22
+ console.error(error);
23
+ return null;
24
+ }
25
+ };
26
+ exports.getStorage = getStorage;
27
+ var clearStorage = function (key) {
28
+ try {
29
+ key && localStorage.removeItem(key);
30
+ !key && localStorage.clear();
31
+ }
32
+ catch (error) {
33
+ console.error(error);
34
+ }
35
+ };
36
+ exports.clearStorage = clearStorage;
37
+ exports.default = {
38
+ setStorage: exports.setStorage,
39
+ getStorage: exports.getStorage,
40
+ clearStorage: exports.clearStorage
41
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,3 +2,9 @@ import { IArrayRandom, IArrayUniq, IArrayDemote, IDemoteArray } from "./index.js
2
2
  export declare const arrayRandom: IArrayRandom<any[]>;
3
3
  export declare const arrayUniq: IArrayUniq<any[]>;
4
4
  export declare const arrayDemote: IArrayDemote<IDemoteArray<any>>;
5
+ declare const _default: {
6
+ arrayRandom: IArrayRandom<any[]>;
7
+ arrayUniq: IArrayUniq<any[]>;
8
+ arrayDemote: IArrayDemote<IDemoteArray<any>>;
9
+ };
10
+ export default _default;
package/dist/esm/array.js CHANGED
@@ -6,3 +6,8 @@ export var arrayDemote = function (arr, result) {
6
6
  arr.forEach(function (i) { return getType(i) === "array" ? arrayDemote(i, result) : result.push(i); });
7
7
  return result;
8
8
  };
9
+ export default {
10
+ arrayRandom: arrayRandom,
11
+ arrayUniq: arrayUniq,
12
+ arrayDemote: arrayDemote
13
+ };
@@ -4,3 +4,11 @@ export declare const urlSplit: IUrlSplit;
4
4
  export declare const urlJoin: IUrlJoin;
5
5
  export declare const getType: IGetType<types>;
6
6
  export declare const getTypeByList: IGetTypeByList;
7
+ declare const _default: {
8
+ randomNum: IRandomNum;
9
+ urlSplit: IUrlSplit;
10
+ urlJoin: IUrlJoin;
11
+ getType: IGetType<types>;
12
+ getTypeByList: IGetTypeByList;
13
+ };
14
+ export default _default;
package/dist/esm/base.js CHANGED
@@ -39,3 +39,10 @@ export var getTypeByList = function (data, whiteList) {
39
39
  var __type = getType(data);
40
40
  return whiteList.indexOf(__type) > 0;
41
41
  };
42
+ export default {
43
+ randomNum: randomNum,
44
+ urlSplit: urlSplit,
45
+ urlJoin: urlJoin,
46
+ getType: getType,
47
+ getTypeByList: getTypeByList,
48
+ };
@@ -1,2 +1,6 @@
1
1
  import { ICreateElement } from "./index.js";
2
2
  export declare const createElement: ICreateElement;
3
+ declare const _default: {
4
+ createElement: ICreateElement<HTMLElement>;
5
+ };
6
+ export default _default;
@@ -7,3 +7,6 @@ export var createElement = function (_a) {
7
7
  parent && parent.appendChild(element);
8
8
  return element;
9
9
  };
10
+ export default {
11
+ createElement: createElement
12
+ };
@@ -4,3 +4,11 @@ export declare const stopBubble: IStopBubble;
4
4
  export declare const stopDefault: IStopDefault;
5
5
  export declare const removeHandler: IRemoveHandler;
6
6
  export declare const dispatchEvent: IDispatchEvent;
7
+ declare const _default: {
8
+ addHandler: IAddHandler;
9
+ stopBubble: IStopBubble;
10
+ stopDefault: IStopDefault;
11
+ removeHandler: IRemoveHandler;
12
+ dispatchEvent: IDispatchEvent;
13
+ };
14
+ export default _default;
package/dist/esm/event.js CHANGED
@@ -36,3 +36,10 @@ export var dispatchEvent = function (ele, data) {
36
36
  var evts = new Event(data);
37
37
  ele.dispatchEvent(evts);
38
38
  };
39
+ export default {
40
+ addHandler: addHandler,
41
+ stopBubble: stopBubble,
42
+ stopDefault: stopDefault,
43
+ removeHandler: removeHandler,
44
+ dispatchEvent: dispatchEvent,
45
+ };
@@ -3,3 +3,10 @@ export declare const throttle: IThrottle;
3
3
  export declare const debounce: IDebounce;
4
4
  export declare const defer: IDefer;
5
5
  export declare const catchAwait: ICatchAwait<Promise<any>>;
6
+ declare const _default: {
7
+ throttle: IThrottle;
8
+ debounce: IDebounce;
9
+ defer: IDefer;
10
+ catchAwait: ICatchAwait<Promise<any>>;
11
+ };
12
+ export default _default;
@@ -51,3 +51,9 @@ export var defer = function () {
51
51
  };
52
52
  };
53
53
  export var catchAwait = function (defer) { return defer.then(function (res) { return [null, res]; }).catch(function (err) { return [err]; }); };
54
+ export default {
55
+ throttle: throttle,
56
+ debounce: debounce,
57
+ defer: defer,
58
+ catchAwait: catchAwait,
59
+ };
@@ -8,3 +8,43 @@ export * from "./types.js";
8
8
  export * from "./request.js";
9
9
  export * from "./event.js";
10
10
  export * from "./storage.js";
11
+ export * from "event-message-center";
12
+ declare const _default: {
13
+ setStorage: (key: string, val: any) => void;
14
+ getStorage: (key: string) => any;
15
+ clearStorage: (key: string) => void;
16
+ addHandler: import("./types.js").IAddHandler;
17
+ stopBubble: import("./types.js").IStopBubble;
18
+ stopDefault: import("./types.js").IStopDefault;
19
+ removeHandler: import("./types.js").IRemoveHandler;
20
+ dispatchEvent: import("./types.js").IDispatchEvent;
21
+ Request: typeof import("./request.js").Request;
22
+ types: typeof import("./static.js").types;
23
+ createElement: import("./types.js").ICreateElement<HTMLElement>;
24
+ throttle: import("./types.js").IThrottle;
25
+ debounce: import("./types.js").IDebounce;
26
+ defer: import("./types.js").IDefer;
27
+ catchAwait: import("./types.js").ICatchAwait<Promise<any>>;
28
+ arrayRandom: import("./types.js").IArrayRandom<any[]>;
29
+ arrayUniq: import("./types.js").IArrayUniq<any[]>;
30
+ arrayDemote: import("./types.js").IArrayDemote<import("./types.js").IDemoteArray<any>>;
31
+ randomNum: import("./types.js").IRandomNum;
32
+ urlSplit: import("./types.js").IUrlSplit;
33
+ urlJoin: import("./types.js").IUrlJoin;
34
+ getType: import("./types.js").IGetType<import("./static.js").types>;
35
+ getTypeByList: import("./types.js").IGetTypeByList;
36
+ getValue: import("./types.js").IGetValue;
37
+ setValue: import("./types.js").ISetValue;
38
+ mixIn: import("./types.js").IMixIn;
39
+ enumInversion: import("./types.js").IEnumInversion;
40
+ isNotObject: (source: any, type: any) => boolean;
41
+ cloneDeep: import("./types.js").ICloneDeep;
42
+ createObjectVariable: import("./types.js").ICreateObjectVariable;
43
+ createObject: import("./types.js").ICreateObject;
44
+ inherit: import("./types.js").IInherit;
45
+ getInstance: import("./types.js").IGetInstance;
46
+ classDecorator: import("./types.js").IClassDecorator;
47
+ stringToJson: import("./types.js").IStringToJson;
48
+ jsonToString: import("./types.js").IJsonToString;
49
+ };
50
+ export default _default;
package/dist/esm/index.js CHANGED
@@ -1,3 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  export * from "./object.js";
2
13
  export * from "./base.js";
3
14
  export * from "./array.js";
@@ -8,3 +19,15 @@ export * from "./types.js";
8
19
  export * from "./request.js";
9
20
  export * from "./event.js";
10
21
  export * from "./storage.js";
22
+ export * from "event-message-center";
23
+ import object from "./object.js";
24
+ import base from "./base.js";
25
+ import array from "./array.js";
26
+ import __function from "./function.js";
27
+ import element from "./element.js";
28
+ import __static from "./static.js";
29
+ import request from "./request.js";
30
+ import event from "./event.js";
31
+ import storage from "./storage.js";
32
+ import eventMessageCenter from "event-message-center";
33
+ export default __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, object), base), array), __function), element), __static), request), event), storage), eventMessageCenter);
@@ -12,3 +12,19 @@ export declare const getInstance: IGetInstance;
12
12
  export declare const classDecorator: IClassDecorator;
13
13
  export declare const stringToJson: IStringToJson;
14
14
  export declare const jsonToString: IJsonToString;
15
+ declare const _default: {
16
+ getValue: IGetValue;
17
+ setValue: ISetValue;
18
+ mixIn: IMixIn;
19
+ enumInversion: IEnumInversion;
20
+ isNotObject: (source: any, type: any) => boolean;
21
+ cloneDeep: ICloneDeep;
22
+ createObjectVariable: ICreateObjectVariable;
23
+ createObject: ICreateObject;
24
+ inherit: IInherit;
25
+ getInstance: IGetInstance;
26
+ classDecorator: IClassDecorator;
27
+ stringToJson: IStringToJson;
28
+ jsonToString: IJsonToString;
29
+ };
30
+ export default _default;
@@ -157,3 +157,18 @@ export var jsonToString = function (target) {
157
157
  return "";
158
158
  }
159
159
  };
160
+ export default {
161
+ getValue: getValue,
162
+ setValue: setValue,
163
+ mixIn: mixIn,
164
+ enumInversion: enumInversion,
165
+ isNotObject: isNotObject,
166
+ cloneDeep: cloneDeep,
167
+ createObjectVariable: createObjectVariable,
168
+ createObject: createObject,
169
+ inherit: inherit,
170
+ getInstance: getInstance,
171
+ classDecorator: classDecorator,
172
+ stringToJson: stringToJson,
173
+ jsonToString: jsonToString,
174
+ };
@@ -54,4 +54,7 @@ export declare class Request extends RequestInit implements IRequest {
54
54
  HEAD: (url?: IUrl, query?: IObject<any>, body?: IRequestBody, opts?: IRequestOptions) => any;
55
55
  PATCH: (url?: IUrl, query?: IObject<any>, body?: IRequestBody, opts?: IRequestOptions) => any;
56
56
  }
57
- export {};
57
+ declare const _default: {
58
+ Request: typeof Request;
59
+ };
60
+ export default _default;
@@ -233,3 +233,4 @@ var Request = (function (_super) {
233
233
  return Request;
234
234
  }(RequestInit));
235
235
  export { Request };
236
+ export default { Request: Request };
@@ -10,3 +10,7 @@ export declare enum types {
10
10
  "[object RegExp]" = "regExp",
11
11
  "[object Math]" = "math"
12
12
  }
13
+ declare const _default: {
14
+ types: typeof types;
15
+ };
16
+ export default _default;
@@ -12,3 +12,4 @@ export var types;
12
12
  types["[object Math]"] = "math";
13
13
  })(types || (types = {}));
14
14
  ;
15
+ export default { types: types };
@@ -1,3 +1,9 @@
1
1
  export declare const setStorage: (key: string, val: any) => void;
2
2
  export declare const getStorage: (key: string) => any;
3
3
  export declare const clearStorage: (key: string) => void;
4
+ declare const _default: {
5
+ setStorage: (key: string, val: any) => void;
6
+ getStorage: (key: string) => any;
7
+ clearStorage: (key: string) => void;
8
+ };
9
+ export default _default;
@@ -28,3 +28,8 @@ export var clearStorage = function (key) {
28
28
  console.error(error);
29
29
  }
30
30
  };
31
+ export default {
32
+ setStorage: setStorage,
33
+ getStorage: getStorage,
34
+ clearStorage: clearStorage
35
+ };
package/package.json CHANGED
@@ -1,43 +1,44 @@
1
- {
2
- "name": "utils-lib-js",
3
- "version": "1.5.1",
4
- "description": "JavaScript工具函数,封装的一些常用的js函数",
5
- "main": "./dist/common/index.js",
6
- "types": "./dist/common/index.d.ts",
7
- "module": "./dist/esm/index.js",
8
- "exports": {
9
- "import": "./dist/esm/index.mjs",
10
- "require": "./dist/common/index.js"
11
- },
12
- "scripts": {
13
- "debug:esm": "start cmd /k pnpm run build:hot:esm",
14
- "debug:node": "start cmd /k pnpm run build:hot:node & pnpm run node:hot",
15
- "node:hot": "nodemon server.js",
16
- "build:hot:esm": "tsc -p tsconfig.es.json -w",
17
- "build:hot:node": "tsc -p tsconfig.json -w",
18
- "build": "pnpm run tsc:build && pnpm run babel:mjs && pnpm run babel:cjs",
19
- "tsc:build": "rm -fr dist && tsc -p tsconfig.json && tsc -p tsconfig.es.json",
20
- "build:publish": "pnpm run build && pnpm run publish",
21
- "babel:mjs": "babel dist/esm --extensions '.js' --out-file-extension --out-file dist/esm/index.mjs",
22
- "babel:cjs": "babel dist/common --out-dir dist/common",
23
- "test": "echo \"Error: no test specified\" && exit 1"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "https://gitee.com/DieHunter/utils-lib-js.git"
28
- },
29
- "keywords": [
30
- "utils",
31
- "tools",
32
- "lib"
33
- ],
34
- "author": "",
35
- "license": "ISC",
36
- "devDependencies": {
37
- "@types/node": "^18.7.15",
38
- "babel-cli": "^6.26.0"
39
- },
40
- "dependencies": {
41
- "abort-controller": "^3.0.0"
42
- }
43
- }
1
+ {
2
+ "name": "utils-lib-js",
3
+ "version": "1.6.1",
4
+ "description": "JavaScript工具函数,封装的一些常用的js函数",
5
+ "main": "./dist/cjs/index.js",
6
+ "types": "./dist/cjs/index.d.ts",
7
+ "module": "./dist/esm/index.js",
8
+ "type": "module",
9
+ "exports": {
10
+ "import": "./dist/esm/index.js",
11
+ "require": "./dist/cjs/index.js"
12
+ },
13
+ "scripts": {
14
+ "debug:esm": "start cmd /k pnpm run build:hot:esm",
15
+ "debug:node": "start cmd /k pnpm run build:hot:node & pnpm run node:hot",
16
+ "node:hot": "nodemon server.js",
17
+ "build:hot:esm": "tsc -p tsconfig.es.json -w",
18
+ "build:hot:node": "tsc -p tsconfig.json -w",
19
+ "build": "pnpm run tsc:build && pnpm run commonjs",
20
+ "tsc:build": "rm -fr dist && tsc -p tsconfig.json && tsc -p tsconfig.es.json",
21
+ "build:publish": "pnpm run build && pnpm run publish",
22
+ "commonjs": "cp ./commonjs.json dist/cjs/package.json",
23
+ "test": "echo \"Error: no test specified\" && exit 1"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://gitee.com/DieHunter/utils-lib-js.git"
28
+ },
29
+ "keywords": [
30
+ "utils",
31
+ "tools",
32
+ "lib"
33
+ ],
34
+ "author": "",
35
+ "license": "ISC",
36
+ "devDependencies": {
37
+ "@types/node": "^18.7.15"
38
+ },
39
+ "dependencies": {
40
+ "abort-controller": "^3.0.0",
41
+ "event-message-center": "",
42
+ "task-queue-lib": ""
43
+ }
44
+ }
package/pnpm-lock.yaml ADDED
@@ -0,0 +1,43 @@
1
+ lockfileVersion: 5.4
2
+
3
+ specifiers:
4
+ '@types/node': ^18.7.15
5
+ abort-controller: ^3.0.0
6
+ event-message-center: ''
7
+ task-queue-lib: ''
8
+
9
+ dependencies:
10
+ abort-controller: 3.0.0
11
+ event-message-center: 1.2.1
12
+ task-queue-lib: 1.1.1
13
+
14
+ devDependencies:
15
+ '@types/node': 18.11.9
16
+
17
+ packages:
18
+
19
+ /@types/node/18.11.9:
20
+ resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==}
21
+ dev: true
22
+
23
+ /abort-controller/3.0.0:
24
+ resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
25
+ engines: {node: '>=6.5'}
26
+ dependencies:
27
+ event-target-shim: 5.0.1
28
+ dev: false
29
+
30
+ /event-message-center/1.2.1:
31
+ resolution: {integrity: sha512-Ld/XWhSMZbggqLd6Z5+U88Pim+kUbfa0x5oKBCMg5h+EsNDpss4LrvJF2hOj4YnAsn8RP1NYaqzySSGvcfIiaA==}
32
+ dev: false
33
+
34
+ /event-target-shim/5.0.1:
35
+ resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
36
+ engines: {node: '>=6'}
37
+ dev: false
38
+
39
+ /task-queue-lib/1.1.1:
40
+ resolution: {integrity: sha512-COVqioPe8Wk9fBT7rT/50j+VeL8Rbjsv3z4I4lIlqpvcohfM98cC6GIT/EC2PaUD3wwEde3kp2NaICzQKeQizQ==}
41
+ dependencies:
42
+ event-message-center: 1.2.1
43
+ dev: false
package/tsconfig.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "inlineSourceMap": false,
18
18
  "emitDecoratorMetadata": true,
19
19
  "experimentalDecorators": true,
20
- "outDir": "dist/common",
20
+ "outDir": "dist/cjs",
21
21
  "rootDir": "src",
22
22
  "skipLibCheck": true,
23
23
  "lib": [
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.arrayDemote = exports.arrayUniq = exports.arrayRandom = void 0;
5
- var index_js_1 = require("./index.js");
6
- var arrayRandom = function (arr) {
7
- return arr.sort(function () {
8
- return Math.random() - 0.5;
9
- });
10
- };
11
- exports.arrayRandom = arrayRandom;
12
- var arrayUniq = function (arr) {
13
- return Array.from(new Set(arr));
14
- };
15
- exports.arrayUniq = arrayUniq;
16
- var arrayDemote = function (arr, result) {
17
- if (result === void 0) {
18
- result = [];
19
- }
20
- arr.forEach(function (i) {
21
- return (0, index_js_1.getType)(i) === "array" ? (0, exports.arrayDemote)(i, result) : result.push(i);
22
- });
23
- return result;
24
- };
25
- exports.arrayDemote = arrayDemote;
@@ -1,2 +0,0 @@
1
- import { ICreateElement } from "./index.js";
2
- export declare const createElement: ICreateElement;
@@ -1,10 +0,0 @@
1
- export * from "./object.js";
2
- export * from "./base.js";
3
- export * from "./array.js";
4
- export * from "./function.js";
5
- export * from "./element.js";
6
- export * from "./static.js";
7
- export * from "./types.js";
8
- export * from "./request.js";
9
- export * from "./event.js";
10
- export * from "./storage.js";
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function () {
8
- return m[k];
9
- } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- } : function (o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- });
16
- var __exportStar = this && this.__exportStar || function (m, exports) {
17
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- __exportStar(require("./object.js"), exports);
21
- __exportStar(require("./base.js"), exports);
22
- __exportStar(require("./array.js"), exports);
23
- __exportStar(require("./function.js"), exports);
24
- __exportStar(require("./element.js"), exports);
25
- __exportStar(require("./static.js"), exports);
26
- __exportStar(require("./types.js"), exports);
27
- __exportStar(require("./request.js"), exports);
28
- __exportStar(require("./event.js"), exports);
29
- __exportStar(require("./storage.js"), exports);
@@ -1,3 +0,0 @@
1
- export declare const setStorage: (key: string, val: any) => void;
2
- export declare const getStorage: (key: string) => any;
3
- export declare const clearStorage: (key: string) => void;
@@ -1,3 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", { value: true });