util-helpers 4.20.5 → 4.20.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.
package/esm/VERSION.js CHANGED
@@ -1,4 +1,4 @@
1
- var VERSION = "4.20.5";
1
+ var VERSION = "4.20.6";
2
2
  var VERSION$1 = VERSION;
3
3
 
4
4
  export { VERSION$1 as default };
package/esm/index.js CHANGED
@@ -63,6 +63,6 @@ export { default as findTreeSelect } from './findTreeSelect.js';
63
63
  export { setDisableWarning } from './utils/config.js';
64
64
  export { default as VERSION } from './VERSION.js';
65
65
 
66
- var version = "4.20.5";
66
+ var version = "4.20.6";
67
67
 
68
68
  export { version };
@@ -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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var VERSION = "4.20.5";
3
+ var VERSION = "4.20.6";
4
4
  var VERSION$1 = VERSION;
5
5
 
6
6
  module.exports = VERSION$1;
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.5";
68
+ exports.version = "4.20.6";
69
69
 
70
70
  exports.isMobile = isMobile;
71
71
  exports.isTelephone = isTelephone;
@@ -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.5",
3
+ "version": "4.20.6",
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",
@@ -77,16 +78,12 @@
77
78
  "prettier": "^2.8.8",
78
79
  "rollup": "^3.28.1",
79
80
  "typescript": "^5.2.2",
80
- "yorkie": "^2.0.0"
81
+ "husky": "^8.0.0"
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.8"
94
+ "ut2": "^1.4.9"
98
95
  }
99
96
  }