utiller 1.0.30 → 1.0.31
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/lib/pooller/index.js
CHANGED
|
@@ -29,17 +29,13 @@ var _configerer = require("configerer");
|
|
|
29
29
|
|
|
30
30
|
var _exceptioner = _interopRequireDefault(require("../exceptioner"));
|
|
31
31
|
|
|
32
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
32
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
33
33
|
|
|
34
34
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
35
|
|
|
36
36
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
41
|
-
|
|
42
|
-
var _run = /*#__PURE__*/new WeakMap();
|
|
38
|
+
var _run = new WeakMap();
|
|
43
39
|
|
|
44
40
|
/**
|
|
45
41
|
*
|
|
@@ -569,7 +565,7 @@ var InfinitePool = /*#__PURE__*/function () {
|
|
|
569
565
|
_index2.utiller.appendInfo(_this.getPoollerLogFormat("mHashNPromiseMap: ".concat(_lodash["default"].size(_this.mHashNPromiseMap))));
|
|
570
566
|
});
|
|
571
567
|
|
|
572
|
-
|
|
568
|
+
_run.set(this, {
|
|
573
569
|
writable: true,
|
|
574
570
|
value: function () {
|
|
575
571
|
var _value = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
package/lib/utiller/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var _exceptioner = _interopRequireDefault(require("../exceptioner"));
|
|
|
33
33
|
|
|
34
34
|
var _moment = _interopRequireDefault(require("moment"));
|
|
35
35
|
|
|
36
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
36
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
37
37
|
|
|
38
38
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
39
|
|
|
@@ -827,6 +827,8 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
827
827
|
|
|
828
828
|
return tmp;
|
|
829
829
|
}
|
|
830
|
+
/** 找到關鍵字所有的index */
|
|
831
|
+
|
|
830
832
|
}, {
|
|
831
833
|
key: "indexesOf",
|
|
832
834
|
value: function indexesOf(arr, val) {
|
|
@@ -858,7 +860,8 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
858
860
|
}, {
|
|
859
861
|
key: "toSpaceLessString",
|
|
860
862
|
value: function toSpaceLessString(string) {
|
|
861
|
-
|
|
863
|
+
/** 這樣寫也可以 string.split('').map((each) => each.trim()).join(''); */
|
|
864
|
+
return _lodash["default"].split(string, "").map(function (each) {
|
|
862
865
|
return _lodash["default"].trim(each);
|
|
863
866
|
}).join("");
|
|
864
867
|
}
|
|
@@ -49,7 +49,7 @@ var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
|
49
49
|
|
|
50
50
|
var _prompt = _interopRequireDefault(require("prompt"));
|
|
51
51
|
|
|
52
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
52
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
53
53
|
|
|
54
54
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
55
55
|
|
package/package.json
CHANGED