utiller 1.0.122 → 1.0.125

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.
@@ -166,10 +166,6 @@ var Utiller = /*#__PURE__*/function () {
166
166
  this.init();
167
167
  this.env = "dev";
168
168
  }
169
- /**
170
- * 執行為了避免沒意義的任務重複執行, 像是search 輸入關鍵字後, 不應該每次onchange就呼叫一次建議列表, 應該等到打完後500ms後在去 執行搜尋任務
171
- * */
172
-
173
169
 
174
170
  (0, _createClass2["default"])(Utiller, [{
175
171
  key: "isValidVersionOfString",
@@ -218,6 +214,21 @@ var Utiller = /*#__PURE__*/function () {
218
214
  numbers[last] = numbers[last] + delta;
219
215
  return numbers.join(".");
220
216
  }
217
+ }, {
218
+ key: "performActionWithoutTimingIssue",
219
+ value: function performActionWithoutTimingIssue() {
220
+ var task = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
221
+ return true;
222
+ };
223
+ var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
224
+ this.syncDelay(wait).then(function () {
225
+ return task();
226
+ });
227
+ }
228
+ /**
229
+ * 執行為了避免沒意義的任務重複執行, 像是search 輸入關鍵字後, 不應該每次onchange就呼叫一次建議列表, 應該等到打完後500ms後在去 執行搜尋任務
230
+ * */
231
+
221
232
  }, {
222
233
  key: "executeTimeoutTask",
223
234
  value: function executeTimeoutTask(functionOfAsyncTask) {
@@ -2270,7 +2281,7 @@ var Utiller = /*#__PURE__*/function () {
2270
2281
  key: "getArrayOfMoveSpecificIndexToAside",
2271
2282
  value: function getArrayOfMoveSpecificIndexToAside(array, index) {
2272
2283
  var toTail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2273
- var indexOfLast = _lodash["default"].size(array) + 1;
2284
+ var indexOfLast = _lodash["default"].size(array) - 1;
2274
2285
  return this.getArrayOfMoveToSpecificIndex(array, index, toTail ? indexOfLast : 0);
2275
2286
  }
2276
2287
  }]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utiller",
3
- "version": "1.0.122",
3
+ "version": "1.0.125",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
13
  "configerer": "^1.0.11",
14
- "utiller": "^1.0.121",
14
+ "utiller": "^1.0.124",
15
15
  "linepayer": "^1.0.4",
16
16
  "databazer": "^1.0.11",
17
17
  "lodash": "^4.17.20",