@sigx/terminal 0.1.17 → 0.1.19
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/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -301,6 +301,18 @@ var arrayInstrumentations = {};
|
|
|
301
301
|
return res;
|
|
302
302
|
};
|
|
303
303
|
});
|
|
304
|
+
[
|
|
305
|
+
"includes",
|
|
306
|
+
"indexOf",
|
|
307
|
+
"lastIndexOf"
|
|
308
|
+
].forEach((method) => {
|
|
309
|
+
arrayInstrumentations[method] = function(...args) {
|
|
310
|
+
const raw = toRaw(this);
|
|
311
|
+
const result = Array.prototype[method].apply(this, args);
|
|
312
|
+
if (result !== -1 && result !== false) return result;
|
|
313
|
+
return Array.prototype[method].apply(raw, args);
|
|
314
|
+
};
|
|
315
|
+
});
|
|
304
316
|
function signal(target) {
|
|
305
317
|
if (isPrimitive(target)) return signal({ value: target });
|
|
306
318
|
const objectTarget = target;
|