@symbo.ls/scratch 2.11.365 → 2.11.375
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/cjs/factory.js +10 -4
- package/dist/cjs/index.js +20 -8
- package/dist/cjs/set.js +20 -8
- package/dist/cjs/system/color.js +20 -8
- package/dist/cjs/system/document.js +20 -8
- package/dist/cjs/system/font.js +20 -8
- package/dist/cjs/system/index.js +20 -8
- package/dist/cjs/system/reset.js +20 -8
- package/dist/cjs/system/shadow.js +20 -8
- package/dist/cjs/system/spacing.js +20 -8
- package/dist/cjs/system/svg.js +20 -8
- package/dist/cjs/system/theme.js +20 -8
- package/dist/cjs/system/timing.js +20 -8
- package/dist/cjs/system/typography.js +20 -8
- package/dist/cjs/transforms/index.js +20 -8
- package/dist/cjs/utils/color.js +10 -4
- package/dist/cjs/utils/index.js +20 -8
- package/dist/cjs/utils/sequence.js +20 -8
- package/dist/cjs/utils/sprite.js +10 -4
- package/dist/cjs/utils/var.js +20 -8
- package/package.json +2 -2
package/dist/cjs/factory.js
CHANGED
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -333,6 +333,7 @@ var require_array = __commonJS({
|
|
|
333
333
|
createNestedObject: () => createNestedObject,
|
|
334
334
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
335
335
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
336
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
336
337
|
joinArrays: () => joinArrays,
|
|
337
338
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
338
339
|
mergeArray: () => mergeArray,
|
|
@@ -347,6 +348,11 @@ var require_array = __commonJS({
|
|
|
347
348
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
348
349
|
return arr2.every((val) => arr1.includes(val));
|
|
349
350
|
};
|
|
351
|
+
var getFrequencyInArray = (arr, value) => {
|
|
352
|
+
return arr.reduce((count, currentValue) => {
|
|
353
|
+
return currentValue === value ? count + 1 : count;
|
|
354
|
+
}, 0);
|
|
355
|
+
};
|
|
350
356
|
var removeFromArray = (arr, index) => {
|
|
351
357
|
if ((0, import_types.isString)(index))
|
|
352
358
|
index = parseInt(index);
|
|
@@ -413,7 +419,7 @@ var require_array = __commonJS({
|
|
|
413
419
|
newArray.splice(index, 1);
|
|
414
420
|
return newArray;
|
|
415
421
|
}
|
|
416
|
-
return arr
|
|
422
|
+
return arr;
|
|
417
423
|
};
|
|
418
424
|
var removeValueFromArrayAll = (arr, value) => {
|
|
419
425
|
return arr.filter((item) => item !== value);
|
|
@@ -761,7 +767,7 @@ var require_object = __commonJS({
|
|
|
761
767
|
continue;
|
|
762
768
|
const objProp = obj[prop];
|
|
763
769
|
if ((0, import_types.isString)(objProp)) {
|
|
764
|
-
if (objProp.includes("=>") || objProp.
|
|
770
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
765
771
|
try {
|
|
766
772
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
767
773
|
destringified[prop] = evalProp;
|
|
@@ -801,11 +807,11 @@ var require_object = __commonJS({
|
|
|
801
807
|
}
|
|
802
808
|
return destringified;
|
|
803
809
|
};
|
|
804
|
-
var stringToObject = (str, verbose) => {
|
|
810
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
805
811
|
try {
|
|
806
812
|
return import_globals3.window.eval("(" + str + ")");
|
|
807
813
|
} catch (e) {
|
|
808
|
-
if (verbose)
|
|
814
|
+
if (opts.verbose)
|
|
809
815
|
console.warn(e);
|
|
810
816
|
}
|
|
811
817
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals3.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
package/dist/cjs/set.js
CHANGED
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals3.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals3.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
package/dist/cjs/system/color.js
CHANGED
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals2.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals2.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals2.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals2.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|
package/dist/cjs/system/font.js
CHANGED
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals2.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1633,6 +1639,7 @@ var require_cjs2 = __commonJS({
|
|
|
1633
1639
|
createNestedObject: () => createNestedObject,
|
|
1634
1640
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1635
1641
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1642
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1636
1643
|
joinArrays: () => joinArrays,
|
|
1637
1644
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1638
1645
|
mergeArray: () => mergeArray,
|
|
@@ -1647,6 +1654,11 @@ var require_cjs2 = __commonJS({
|
|
|
1647
1654
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1648
1655
|
return arr2.every((val) => arr1.includes(val));
|
|
1649
1656
|
};
|
|
1657
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1658
|
+
return arr.reduce((count, currentValue) => {
|
|
1659
|
+
return currentValue === value ? count + 1 : count;
|
|
1660
|
+
}, 0);
|
|
1661
|
+
};
|
|
1650
1662
|
var removeFromArray = (arr, index) => {
|
|
1651
1663
|
if ((0, import_types.isString)(index))
|
|
1652
1664
|
index = parseInt(index);
|
|
@@ -1713,7 +1725,7 @@ var require_cjs2 = __commonJS({
|
|
|
1713
1725
|
newArray.splice(index, 1);
|
|
1714
1726
|
return newArray;
|
|
1715
1727
|
}
|
|
1716
|
-
return arr
|
|
1728
|
+
return arr;
|
|
1717
1729
|
};
|
|
1718
1730
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1719
1731
|
return arr.filter((item) => item !== value);
|
|
@@ -2057,7 +2069,7 @@ var require_cjs2 = __commonJS({
|
|
|
2057
2069
|
continue;
|
|
2058
2070
|
const objProp = obj[prop];
|
|
2059
2071
|
if ((0, import_types.isString)(objProp)) {
|
|
2060
|
-
if (objProp.includes("=>") || objProp.
|
|
2072
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2061
2073
|
try {
|
|
2062
2074
|
const evalProp = import_globals2.window.eval(`(${objProp})`);
|
|
2063
2075
|
destringified[prop] = evalProp;
|
|
@@ -2097,11 +2109,11 @@ var require_cjs2 = __commonJS({
|
|
|
2097
2109
|
}
|
|
2098
2110
|
return destringified;
|
|
2099
2111
|
};
|
|
2100
|
-
var stringToObject = (str, verbose) => {
|
|
2112
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2101
2113
|
try {
|
|
2102
2114
|
return import_globals2.window.eval("(" + str + ")");
|
|
2103
2115
|
} catch (e) {
|
|
2104
|
-
if (verbose)
|
|
2116
|
+
if (opts.verbose)
|
|
2105
2117
|
console.warn(e);
|
|
2106
2118
|
}
|
|
2107
2119
|
};
|
package/dist/cjs/system/index.js
CHANGED
|
@@ -297,6 +297,7 @@ var require_array = __commonJS({
|
|
|
297
297
|
createNestedObject: () => createNestedObject,
|
|
298
298
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
299
299
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
300
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
300
301
|
joinArrays: () => joinArrays,
|
|
301
302
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
302
303
|
mergeArray: () => mergeArray,
|
|
@@ -311,6 +312,11 @@ var require_array = __commonJS({
|
|
|
311
312
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
312
313
|
return arr2.every((val) => arr1.includes(val));
|
|
313
314
|
};
|
|
315
|
+
var getFrequencyInArray = (arr, value) => {
|
|
316
|
+
return arr.reduce((count, currentValue) => {
|
|
317
|
+
return currentValue === value ? count + 1 : count;
|
|
318
|
+
}, 0);
|
|
319
|
+
};
|
|
314
320
|
var removeFromArray = (arr, index) => {
|
|
315
321
|
if ((0, import_types.isString)(index))
|
|
316
322
|
index = parseInt(index);
|
|
@@ -377,7 +383,7 @@ var require_array = __commonJS({
|
|
|
377
383
|
newArray.splice(index, 1);
|
|
378
384
|
return newArray;
|
|
379
385
|
}
|
|
380
|
-
return arr
|
|
386
|
+
return arr;
|
|
381
387
|
};
|
|
382
388
|
var removeValueFromArrayAll = (arr, value) => {
|
|
383
389
|
return arr.filter((item) => item !== value);
|
|
@@ -725,7 +731,7 @@ var require_object = __commonJS({
|
|
|
725
731
|
continue;
|
|
726
732
|
const objProp = obj[prop];
|
|
727
733
|
if ((0, import_types.isString)(objProp)) {
|
|
728
|
-
if (objProp.includes("=>") || objProp.
|
|
734
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
729
735
|
try {
|
|
730
736
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
731
737
|
destringified[prop] = evalProp;
|
|
@@ -765,11 +771,11 @@ var require_object = __commonJS({
|
|
|
765
771
|
}
|
|
766
772
|
return destringified;
|
|
767
773
|
};
|
|
768
|
-
var stringToObject = (str, verbose) => {
|
|
774
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
769
775
|
try {
|
|
770
776
|
return import_globals3.window.eval("(" + str + ")");
|
|
771
777
|
} catch (e) {
|
|
772
|
-
if (verbose)
|
|
778
|
+
if (opts.verbose)
|
|
773
779
|
console.warn(e);
|
|
774
780
|
}
|
|
775
781
|
};
|
|
@@ -1669,6 +1675,7 @@ var require_cjs3 = __commonJS({
|
|
|
1669
1675
|
createNestedObject: () => createNestedObject,
|
|
1670
1676
|
cutArrayAfterValue: () => cutArrayAfterValue,
|
|
1671
1677
|
cutArrayBeforeValue: () => cutArrayBeforeValue,
|
|
1678
|
+
getFrequencyInArray: () => getFrequencyInArray,
|
|
1672
1679
|
joinArrays: () => joinArrays,
|
|
1673
1680
|
mergeAndCloneIfArray: () => mergeAndCloneIfArray,
|
|
1674
1681
|
mergeArray: () => mergeArray,
|
|
@@ -1683,6 +1690,11 @@ var require_cjs3 = __commonJS({
|
|
|
1683
1690
|
var arrayContainsOtherArray = (arr1, arr2) => {
|
|
1684
1691
|
return arr2.every((val) => arr1.includes(val));
|
|
1685
1692
|
};
|
|
1693
|
+
var getFrequencyInArray = (arr, value) => {
|
|
1694
|
+
return arr.reduce((count, currentValue) => {
|
|
1695
|
+
return currentValue === value ? count + 1 : count;
|
|
1696
|
+
}, 0);
|
|
1697
|
+
};
|
|
1686
1698
|
var removeFromArray = (arr, index) => {
|
|
1687
1699
|
if ((0, import_types.isString)(index))
|
|
1688
1700
|
index = parseInt(index);
|
|
@@ -1749,7 +1761,7 @@ var require_cjs3 = __commonJS({
|
|
|
1749
1761
|
newArray.splice(index, 1);
|
|
1750
1762
|
return newArray;
|
|
1751
1763
|
}
|
|
1752
|
-
return arr
|
|
1764
|
+
return arr;
|
|
1753
1765
|
};
|
|
1754
1766
|
var removeValueFromArrayAll = (arr, value) => {
|
|
1755
1767
|
return arr.filter((item) => item !== value);
|
|
@@ -2093,7 +2105,7 @@ var require_cjs3 = __commonJS({
|
|
|
2093
2105
|
continue;
|
|
2094
2106
|
const objProp = obj[prop];
|
|
2095
2107
|
if ((0, import_types.isString)(objProp)) {
|
|
2096
|
-
if (objProp.includes("=>") || objProp.
|
|
2108
|
+
if ((objProp.includes("=>") || objProp.startsWith("function") || objProp.startsWith("(")) && !objProp.startsWith("{") && !objProp.startsWith("[")) {
|
|
2097
2109
|
try {
|
|
2098
2110
|
const evalProp = import_globals3.window.eval(`(${objProp})`);
|
|
2099
2111
|
destringified[prop] = evalProp;
|
|
@@ -2133,11 +2145,11 @@ var require_cjs3 = __commonJS({
|
|
|
2133
2145
|
}
|
|
2134
2146
|
return destringified;
|
|
2135
2147
|
};
|
|
2136
|
-
var stringToObject = (str, verbose) => {
|
|
2148
|
+
var stringToObject = (str, opts = { verbose: true }) => {
|
|
2137
2149
|
try {
|
|
2138
2150
|
return import_globals3.window.eval("(" + str + ")");
|
|
2139
2151
|
} catch (e) {
|
|
2140
|
-
if (verbose)
|
|
2152
|
+
if (opts.verbose)
|
|
2141
2153
|
console.warn(e);
|
|
2142
2154
|
}
|
|
2143
2155
|
};
|