util-helpers 4.20.5 → 4.20.7
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/README.md +4 -2
- package/dist/util-helpers.js +12 -4
- package/dist/util-helpers.js.map +1 -1
- package/dist/util-helpers.min.js +1 -1
- package/dist/util-helpers.min.js.map +1 -1
- package/esm/VERSION.js +1 -1
- package/esm/index.js +1 -1
- package/esm/utils/native.js +4 -2
- package/lib/VERSION.js +1 -1
- package/lib/index.js +1 -1
- package/lib/utils/native.js +4 -2
- package/package.json +21 -24
package/esm/VERSION.js
CHANGED
package/esm/index.js
CHANGED
package/esm/utils/native.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { constant, noop } from 'ut2';
|
|
2
|
+
|
|
1
3
|
var objectKeys = Object.keys;
|
|
2
|
-
var createObjectURL = URL.createObjectURL;
|
|
3
|
-
var revokeObjectURL = URL.revokeObjectURL;
|
|
4
|
+
var createObjectURL = typeof URL !== 'undefined' ? URL.createObjectURL : constant('');
|
|
5
|
+
var revokeObjectURL = typeof URL !== 'undefined' ? URL.revokeObjectURL : noop;
|
|
4
6
|
|
|
5
7
|
export { createObjectURL, objectKeys, revokeObjectURL };
|
package/lib/VERSION.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var findTreeSelect = require('./findTreeSelect.js');
|
|
|
65
65
|
var config = require('./utils/config.js');
|
|
66
66
|
var VERSION = require('./VERSION.js');
|
|
67
67
|
|
|
68
|
-
exports.version = "4.20.
|
|
68
|
+
exports.version = "4.20.7";
|
|
69
69
|
|
|
70
70
|
exports.isMobile = isMobile;
|
|
71
71
|
exports.isTelephone = isTelephone;
|
package/lib/utils/native.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var ut2 = require('ut2');
|
|
4
|
+
|
|
3
5
|
exports.objectKeys = Object.keys;
|
|
4
|
-
exports.createObjectURL = URL.createObjectURL;
|
|
5
|
-
exports.revokeObjectURL = URL.revokeObjectURL;
|
|
6
|
+
exports.createObjectURL = typeof URL !== 'undefined' ? URL.createObjectURL : ut2.constant('');
|
|
7
|
+
exports.revokeObjectURL = typeof URL !== 'undefined' ? URL.revokeObjectURL : ut2.noop;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "util-helpers",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.7",
|
|
4
4
|
"description": "一个基于业务场景的工具方法库",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
24
24
|
"commit": "cz",
|
|
25
25
|
"prepublishOnly": "npm test && npm run build",
|
|
26
|
-
"tsc": "tsc --noEmit"
|
|
26
|
+
"tsc": "tsc --noEmit",
|
|
27
|
+
"prepare": "husky install"
|
|
27
28
|
},
|
|
28
29
|
"repository": {
|
|
29
30
|
"type": "git",
|
|
@@ -50,43 +51,39 @@
|
|
|
50
51
|
},
|
|
51
52
|
"homepage": "https://doly-dev.github.io/util-helpers/index.html",
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@babel/core": "^7.
|
|
54
|
-
"@babel/preset-env": "^7.22.
|
|
55
|
-
"@babel/preset-typescript": "^7.
|
|
56
|
-
"@commitlint/cli": "^17.7.
|
|
54
|
+
"@babel/core": "^7.23.0",
|
|
55
|
+
"@babel/preset-env": "^7.22.20",
|
|
56
|
+
"@babel/preset-typescript": "^7.23.0",
|
|
57
|
+
"@commitlint/cli": "^17.7.2",
|
|
57
58
|
"@commitlint/config-conventional": "^17.7.0",
|
|
58
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
59
|
-
"@rollup/plugin-node-resolve": "^15.2.
|
|
60
|
-
"@rollup/plugin-replace": "^5.0.
|
|
61
|
-
"@rollup/plugin-terser": "^0.4.
|
|
62
|
-
"@rollup/plugin-typescript": "^11.1.
|
|
63
|
-
"@types/jest": "^29.5.
|
|
59
|
+
"@rollup/plugin-commonjs": "^25.0.5",
|
|
60
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
61
|
+
"@rollup/plugin-replace": "^5.0.3",
|
|
62
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
63
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
64
|
+
"@types/jest": "^29.5.5",
|
|
64
65
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
65
66
|
"@typescript-eslint/parser": "^5.62.0",
|
|
66
|
-
"babel-jest": "^29.
|
|
67
|
+
"babel-jest": "^29.7.0",
|
|
67
68
|
"babel-plugin-minify-replace": "^0.5.0",
|
|
68
69
|
"cross-env": "^7.0.3",
|
|
69
70
|
"cz-conventional-changelog": "^3.3.0",
|
|
70
71
|
"docdash": "^2.0.2",
|
|
71
|
-
"eslint": "^8.
|
|
72
|
-
"
|
|
72
|
+
"eslint": "^8.51.0",
|
|
73
|
+
"husky": "^8.0.3",
|
|
74
|
+
"jest": "^29.7.0",
|
|
73
75
|
"jest-canvas-mock": "^2.5.2",
|
|
74
|
-
"jest-environment-jsdom": "^29.
|
|
76
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
75
77
|
"jsdoc": "^4.0.2",
|
|
76
78
|
"lint-staged": "^13.3.0",
|
|
77
79
|
"prettier": "^2.8.8",
|
|
78
|
-
"rollup": "^3.
|
|
79
|
-
"typescript": "^5.2.2"
|
|
80
|
-
"yorkie": "^2.0.0"
|
|
80
|
+
"rollup": "^3.29.4",
|
|
81
|
+
"typescript": "^5.2.2"
|
|
81
82
|
},
|
|
82
83
|
"lint-staged": {
|
|
83
84
|
"**/*.ts": "eslint",
|
|
84
85
|
"**/*.{js,ts,md}": "prettier --write"
|
|
85
86
|
},
|
|
86
|
-
"gitHooks": {
|
|
87
|
-
"pre-commit": "lint-staged",
|
|
88
|
-
"commit-msg": "npx --no -- commitlint --edit \"$1\""
|
|
89
|
-
},
|
|
90
87
|
"config": {
|
|
91
88
|
"commitizen": {
|
|
92
89
|
"path": "./node_modules/cz-conventional-changelog"
|
|
@@ -94,6 +91,6 @@
|
|
|
94
91
|
},
|
|
95
92
|
"dependencies": {
|
|
96
93
|
"tslib": "^2.6.2",
|
|
97
|
-
"ut2": "^1.4.
|
|
94
|
+
"ut2": "^1.4.10"
|
|
98
95
|
}
|
|
99
96
|
}
|