jscrewit 2.35.2 → 2.37.0
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/Features.md +6 -2
- package/api-doc/README.md +8 -46
- package/api-doc/interfaces/FeatureAll.md +49 -18
- package/api-doc/interfaces/FeatureConstructor.md +62 -19
- package/lib/feature-all.d.ts +35 -17
- package/lib/jscrewit.js +53 -24
- package/lib/jscrewit.min.js +2 -2
- package/package.json +9 -5
- package/readme.md +4 -4
package/lib/feature-all.d.ts
CHANGED
|
@@ -96,34 +96,34 @@ export interface FeatureAll
|
|
|
96
96
|
/**
|
|
97
97
|
* Features available in the current stable versions of Chrome, Edge and Opera.
|
|
98
98
|
*
|
|
99
|
-
* An alias for `
|
|
99
|
+
* An alias for `CHROME_122`.
|
|
100
100
|
*/
|
|
101
101
|
CHROME: PredefinedFeature;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* Features available in Chrome
|
|
104
|
+
* Features available in Chrome 122, Edge 122 and Opera 108 or later.
|
|
105
105
|
*
|
|
106
106
|
* @remarks
|
|
107
107
|
*
|
|
108
|
-
* This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `CHROME` or `CHROME_PREV` instead of `
|
|
108
|
+
* This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `CHROME` or `CHROME_PREV` instead of `CHROME_122` for long term support.
|
|
109
109
|
*
|
|
110
110
|
* @see
|
|
111
111
|
*
|
|
112
112
|
* [Engine Support Policy](https://github.com/fasttime/JScrewIt#engine-support-policy)
|
|
113
113
|
*/
|
|
114
|
-
|
|
114
|
+
CHROME_122: PredefinedFeature;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Features available in the previous to current versions of Chrome and Edge.
|
|
118
118
|
*
|
|
119
|
-
* An alias for `
|
|
119
|
+
* An alias for `CHROME_122`.
|
|
120
120
|
*/
|
|
121
121
|
CHROME_PREV: PredefinedFeature;
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* All new browsers' features.
|
|
125
125
|
*
|
|
126
|
-
* No support for Node.js and older browsers like Internet Explorer, Safari
|
|
126
|
+
* No support for Node.js and older browsers like Internet Explorer, Safari 17.3 or Android Browser.
|
|
127
127
|
*/
|
|
128
128
|
COMPACT: PredefinedFeature;
|
|
129
129
|
|
|
@@ -281,7 +281,7 @@ export interface FeatureAll
|
|
|
281
281
|
*
|
|
282
282
|
* @remarks
|
|
283
283
|
*
|
|
284
|
-
* Available in Chrome, Edge, Firefox, Opera, and Node.js 10+.
|
|
284
|
+
* Available in Chrome, Edge, Firefox, Safari 17.4+, Opera, and Node.js 10+.
|
|
285
285
|
*/
|
|
286
286
|
FUNCTION_19_LF: ElementaryFeature;
|
|
287
287
|
|
|
@@ -290,7 +290,7 @@ export interface FeatureAll
|
|
|
290
290
|
*
|
|
291
291
|
* @remarks
|
|
292
292
|
*
|
|
293
|
-
* Available in Internet Explorer, Safari 9
|
|
293
|
+
* Available in Internet Explorer, Safari 9+ before 17.4, Android Browser, and Node.js before 10.
|
|
294
294
|
*/
|
|
295
295
|
FUNCTION_22_LF: ElementaryFeature;
|
|
296
296
|
|
|
@@ -471,9 +471,12 @@ export interface FeatureAll
|
|
|
471
471
|
/** Features available in Node.js 16.0 to 16.5. */
|
|
472
472
|
NODE_16_0: PredefinedFeature;
|
|
473
473
|
|
|
474
|
-
/** Features available in Node.js 16.6
|
|
474
|
+
/** Features available in Node.js 16.6 to 21. */
|
|
475
475
|
NODE_16_6: PredefinedFeature;
|
|
476
476
|
|
|
477
|
+
/** Features available in Node.js 22 or later. */
|
|
478
|
+
NODE_22: PredefinedFeature;
|
|
479
|
+
|
|
477
480
|
/** Features available in Node.js 4. */
|
|
478
481
|
NODE_4: PredefinedFeature;
|
|
479
482
|
|
|
@@ -501,7 +504,7 @@ export interface FeatureAll
|
|
|
501
504
|
NO_IE_SRC: ElementaryFeature;
|
|
502
505
|
|
|
503
506
|
/**
|
|
504
|
-
* The property that the string representation of Array.prototype.entries\(\) evaluates to "\[object Array Iterator\]"
|
|
507
|
+
* The property that the string representation of Array.prototype.entries\(\) evaluates to "\[object Array Iterator\]".
|
|
505
508
|
*
|
|
506
509
|
* @remarks
|
|
507
510
|
*
|
|
@@ -521,7 +524,16 @@ export interface FeatureAll
|
|
|
521
524
|
NO_V8_SRC: ElementaryFeature;
|
|
522
525
|
|
|
523
526
|
/**
|
|
524
|
-
*
|
|
527
|
+
* The property that the Array.prototype.entries\(\).constructor is the Object constructor.
|
|
528
|
+
*
|
|
529
|
+
* @remarks
|
|
530
|
+
*
|
|
531
|
+
* Available in Firefox, Safari 9+, and Node.js 0.12+ before 22.
|
|
532
|
+
*/
|
|
533
|
+
OBJECT_ARRAY_ENTRIES_CTOR: ElementaryFeature;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Existence of the global function location.constructor whose string representation starts with "\[object L".
|
|
525
537
|
*
|
|
526
538
|
* @remarks
|
|
527
539
|
*
|
|
@@ -539,7 +551,7 @@ export interface FeatureAll
|
|
|
539
551
|
OBJECT_UNDEFINED: ElementaryFeature;
|
|
540
552
|
|
|
541
553
|
/**
|
|
542
|
-
* The property that the string representation of the global object constructor starts with "\[object W"
|
|
554
|
+
* The property that the string representation of the global object constructor starts with "\[object W".
|
|
543
555
|
*
|
|
544
556
|
* @remarks
|
|
545
557
|
*
|
|
@@ -548,7 +560,7 @@ export interface FeatureAll
|
|
|
548
560
|
OBJECT_W_CTOR: ElementaryFeature;
|
|
549
561
|
|
|
550
562
|
/**
|
|
551
|
-
* Existence of the global object location.constructor whose string representation starts with "\[object " and ends with "LocationConstructor\]"
|
|
563
|
+
* Existence of the global object location.constructor whose string representation starts with "\[object " and ends with "LocationConstructor\]".
|
|
552
564
|
*
|
|
553
565
|
* @remarks
|
|
554
566
|
*
|
|
@@ -557,7 +569,7 @@ export interface FeatureAll
|
|
|
557
569
|
OLD_SAFARI_LOCATION_CTOR: ElementaryFeature;
|
|
558
570
|
|
|
559
571
|
/**
|
|
560
|
-
* Existence of the global object Intl having the string representation "\[object Object\]"
|
|
572
|
+
* Existence of the global object Intl having the string representation "\[object Object\]".
|
|
561
573
|
*
|
|
562
574
|
* @remarks
|
|
563
575
|
*
|
|
@@ -577,7 +589,7 @@ export interface FeatureAll
|
|
|
577
589
|
/**
|
|
578
590
|
* Features available in the current stable version of Safari.
|
|
579
591
|
*
|
|
580
|
-
* An alias for `
|
|
592
|
+
* An alias for `SAFARI_17_4`.
|
|
581
593
|
*/
|
|
582
594
|
SAFARI: PredefinedFeature;
|
|
583
595
|
|
|
@@ -596,9 +608,12 @@ export interface FeatureAll
|
|
|
596
608
|
/** Features available in Safari 14.1 to 15.3. */
|
|
597
609
|
SAFARI_14_1: PredefinedFeature;
|
|
598
610
|
|
|
599
|
-
/** Features available in Safari 15.4
|
|
611
|
+
/** Features available in Safari 15.4 to 17.3. */
|
|
600
612
|
SAFARI_15_4: PredefinedFeature;
|
|
601
613
|
|
|
614
|
+
/** Features available in Safari 17.4 or later. */
|
|
615
|
+
SAFARI_17_4: PredefinedFeature;
|
|
616
|
+
|
|
602
617
|
/** Features available in Safari 7.0. */
|
|
603
618
|
SAFARI_7_0: PredefinedFeature;
|
|
604
619
|
|
|
@@ -713,6 +728,7 @@ type ElementaryFeatureName =
|
|
|
713
728
|
| 'NO_IE_SRC'
|
|
714
729
|
| 'NO_OLD_SAFARI_ARRAY_ITERATOR'
|
|
715
730
|
| 'NO_V8_SRC'
|
|
731
|
+
| 'OBJECT_ARRAY_ENTRIES_CTOR'
|
|
716
732
|
| 'OBJECT_L_LOCATION_CTOR'
|
|
717
733
|
| 'OBJECT_UNDEFINED'
|
|
718
734
|
| 'OBJECT_W_CTOR'
|
|
@@ -735,7 +751,7 @@ ElementaryFeatureName
|
|
|
735
751
|
| 'ANDRO_4_4'
|
|
736
752
|
| 'AUTO'
|
|
737
753
|
| 'BROWSER'
|
|
738
|
-
| '
|
|
754
|
+
| 'CHROME_122'
|
|
739
755
|
| 'COMPACT'
|
|
740
756
|
| 'DEFAULT'
|
|
741
757
|
| 'FF_90'
|
|
@@ -752,6 +768,7 @@ ElementaryFeatureName
|
|
|
752
768
|
| 'NODE_15'
|
|
753
769
|
| 'NODE_16_0'
|
|
754
770
|
| 'NODE_16_6'
|
|
771
|
+
| 'NODE_22'
|
|
755
772
|
| 'NODE_4'
|
|
756
773
|
| 'NODE_5'
|
|
757
774
|
| 'SAFARI_10'
|
|
@@ -760,6 +777,7 @@ ElementaryFeatureName
|
|
|
760
777
|
| 'SAFARI_14_0_1'
|
|
761
778
|
| 'SAFARI_14_1'
|
|
762
779
|
| 'SAFARI_15_4'
|
|
780
|
+
| 'SAFARI_17_4'
|
|
763
781
|
| 'SAFARI_7_0'
|
|
764
782
|
| 'SAFARI_7_1'
|
|
765
783
|
| 'SAFARI_9'
|
package/lib/jscrewit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// JScrewIt 2.
|
|
1
|
+
// JScrewIt 2.37.0 – https://jscrew.it
|
|
2
2
|
|
|
3
3
|
(function () {
|
|
4
4
|
'use strict';
|
|
@@ -608,7 +608,11 @@
|
|
|
608
608
|
}
|
|
609
609
|
var utilInspect;
|
|
610
610
|
try {
|
|
611
|
+
/* eslint-disable
|
|
612
|
+
@typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
|
|
611
613
|
utilInspect = require('util').inspect;
|
|
614
|
+
/* eslint-enable
|
|
615
|
+
@typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
|
|
612
616
|
}
|
|
613
617
|
catch (_a) { }
|
|
614
618
|
{
|
|
@@ -1519,17 +1523,13 @@
|
|
|
1519
1523
|
{
|
|
1520
1524
|
description:
|
|
1521
1525
|
'The property that the string representation of Array.prototype.entries() evaluates to ' +
|
|
1522
|
-
'"[object Array Iterator]"
|
|
1523
|
-
'function Object.',
|
|
1526
|
+
'"[object Array Iterator]".',
|
|
1524
1527
|
check:
|
|
1525
1528
|
function ()
|
|
1526
1529
|
{
|
|
1527
1530
|
if (Array.prototype.entries)
|
|
1528
1531
|
{
|
|
1529
|
-
var
|
|
1530
|
-
var available =
|
|
1531
|
-
arrayIterator + '' === '[object Array Iterator]' &&
|
|
1532
|
-
arrayIterator.constructor === Object;
|
|
1532
|
+
var available = [].entries() + '' === '[object Array Iterator]';
|
|
1533
1533
|
return available;
|
|
1534
1534
|
}
|
|
1535
1535
|
},
|
|
@@ -1550,11 +1550,22 @@
|
|
|
1550
1550
|
},
|
|
1551
1551
|
excludes: ['V8_SRC'],
|
|
1552
1552
|
},
|
|
1553
|
+
OBJECT_ARRAY_ENTRIES_CTOR:
|
|
1554
|
+
{
|
|
1555
|
+
description:
|
|
1556
|
+
'The property that the Array.prototype.entries().constructor is the Object constructor.',
|
|
1557
|
+
check:
|
|
1558
|
+
function ()
|
|
1559
|
+
{
|
|
1560
|
+
var available = Array.prototype.entries && [].entries().constructor === Object;
|
|
1561
|
+
return available;
|
|
1562
|
+
},
|
|
1563
|
+
},
|
|
1553
1564
|
OBJECT_L_LOCATION_CTOR:
|
|
1554
1565
|
{
|
|
1555
1566
|
description:
|
|
1556
1567
|
'Existence of the global function location.constructor whose string representation ' +
|
|
1557
|
-
'starts with "[object L"',
|
|
1568
|
+
'starts with "[object L".',
|
|
1558
1569
|
check:
|
|
1559
1570
|
function ()
|
|
1560
1571
|
{
|
|
@@ -1582,7 +1593,7 @@
|
|
|
1582
1593
|
{
|
|
1583
1594
|
description:
|
|
1584
1595
|
'The property that the string representation of the global object constructor starts ' +
|
|
1585
|
-
'with "[object W"',
|
|
1596
|
+
'with "[object W".',
|
|
1586
1597
|
check:
|
|
1587
1598
|
function ()
|
|
1588
1599
|
{
|
|
@@ -1595,7 +1606,7 @@
|
|
|
1595
1606
|
{
|
|
1596
1607
|
description:
|
|
1597
1608
|
'Existence of the global object location.constructor whose string representation starts ' +
|
|
1598
|
-
'with "[object " and ends with "LocationConstructor]"',
|
|
1609
|
+
'with "[object " and ends with "LocationConstructor]".',
|
|
1599
1610
|
check:
|
|
1600
1611
|
function ()
|
|
1601
1612
|
{
|
|
@@ -1608,7 +1619,7 @@
|
|
|
1608
1619
|
PLAIN_INTL:
|
|
1609
1620
|
{
|
|
1610
1621
|
description:
|
|
1611
|
-
'Existence of the global object Intl having the string representation "[object Object]"',
|
|
1622
|
+
'Existence of the global object Intl having the string representation "[object Object]".',
|
|
1612
1623
|
check:
|
|
1613
1624
|
function ()
|
|
1614
1625
|
{
|
|
@@ -1738,8 +1749,8 @@
|
|
|
1738
1749
|
{
|
|
1739
1750
|
description:
|
|
1740
1751
|
'All new browsers\' features.\n' +
|
|
1741
|
-
'No support for Node.js and older browsers like Internet Explorer, Safari
|
|
1742
|
-
'Browser.',
|
|
1752
|
+
'No support for Node.js and older browsers like Internet Explorer, Safari 17.3 or ' +
|
|
1753
|
+
'Android Browser.',
|
|
1743
1754
|
includes:
|
|
1744
1755
|
[
|
|
1745
1756
|
'ARROW',
|
|
@@ -1752,6 +1763,7 @@
|
|
|
1752
1763
|
'FILL',
|
|
1753
1764
|
'FLAT',
|
|
1754
1765
|
'FROM_CODE_POINT',
|
|
1766
|
+
'FUNCTION_19_LF',
|
|
1755
1767
|
'GENERIC_ARRAY_TO_STRING',
|
|
1756
1768
|
'GLOBAL_UNDEFINED',
|
|
1757
1769
|
'GMT',
|
|
@@ -1818,17 +1830,17 @@
|
|
|
1818
1830
|
CHROME_PREV:
|
|
1819
1831
|
{
|
|
1820
1832
|
description: describeEngine('the previous to current versions of Chrome and Edge'),
|
|
1821
|
-
aliasFor: '
|
|
1833
|
+
aliasFor: 'CHROME_122',
|
|
1822
1834
|
},
|
|
1823
1835
|
CHROME:
|
|
1824
1836
|
{
|
|
1825
1837
|
description: describeEngine('the current stable versions of Chrome, Edge and Opera'),
|
|
1826
|
-
aliasFor: '
|
|
1838
|
+
aliasFor: 'CHROME_122',
|
|
1827
1839
|
},
|
|
1828
|
-
|
|
1840
|
+
CHROME_122:
|
|
1829
1841
|
{
|
|
1830
1842
|
families: ['Chrome', 'Edge', 'Opera'],
|
|
1831
|
-
versions: [['
|
|
1843
|
+
versions: [['122'], ['122'], ['108']],
|
|
1832
1844
|
includes:
|
|
1833
1845
|
[
|
|
1834
1846
|
'ARROW',
|
|
@@ -1907,6 +1919,7 @@
|
|
|
1907
1919
|
'LOCATION',
|
|
1908
1920
|
'NAME',
|
|
1909
1921
|
'NO_OLD_SAFARI_ARRAY_ITERATOR',
|
|
1922
|
+
'OBJECT_ARRAY_ENTRIES_CTOR',
|
|
1910
1923
|
'REGEXP_STRING_ITERATOR',
|
|
1911
1924
|
'SHORT_LOCALES',
|
|
1912
1925
|
'STATUS',
|
|
@@ -1993,6 +2006,7 @@
|
|
|
1993
2006
|
ESC_HTML_QUOT_ONLY: true,
|
|
1994
2007
|
LOCALE_INFINITY: true,
|
|
1995
2008
|
NO_OLD_SAFARI_ARRAY_ITERATOR: true,
|
|
2009
|
+
OBJECT_ARRAY_ENTRIES_CTOR: true,
|
|
1996
2010
|
PLAIN_INTL: true,
|
|
1997
2011
|
},
|
|
1998
2012
|
},
|
|
@@ -2047,9 +2061,15 @@
|
|
|
2047
2061
|
NODE_16_6:
|
|
2048
2062
|
{
|
|
2049
2063
|
inherits: 'NODE_16_0',
|
|
2050
|
-
versions: [['16.6']],
|
|
2064
|
+
versions: [['16.6',, '21']],
|
|
2051
2065
|
includes: { AT: true },
|
|
2052
2066
|
},
|
|
2067
|
+
NODE_22:
|
|
2068
|
+
{
|
|
2069
|
+
inherits: 'NODE_16_6',
|
|
2070
|
+
versions: [['22']],
|
|
2071
|
+
includes: { OBJECT_ARRAY_ENTRIES_CTOR: false },
|
|
2072
|
+
},
|
|
2053
2073
|
SAFARI_7_0:
|
|
2054
2074
|
{
|
|
2055
2075
|
families: ['Safari'],
|
|
@@ -2103,6 +2123,7 @@
|
|
|
2103
2123
|
FROM_CODE_POINT: true,
|
|
2104
2124
|
FUNCTION_22_LF: true,
|
|
2105
2125
|
NO_OLD_SAFARI_ARRAY_ITERATOR: true,
|
|
2126
|
+
OBJECT_ARRAY_ENTRIES_CTOR: true,
|
|
2106
2127
|
},
|
|
2107
2128
|
},
|
|
2108
2129
|
SAFARI_10:
|
|
@@ -2147,16 +2168,22 @@
|
|
|
2147
2168
|
versions: [['14.1',, '15.3']],
|
|
2148
2169
|
includes: { CONSOLE: false },
|
|
2149
2170
|
},
|
|
2171
|
+
SAFARI_15_4:
|
|
2172
|
+
{
|
|
2173
|
+
inherits: 'SAFARI_14_1',
|
|
2174
|
+
versions: [['15.4',, '17.3']],
|
|
2175
|
+
includes: { AT: true },
|
|
2176
|
+
},
|
|
2150
2177
|
SAFARI:
|
|
2151
2178
|
{
|
|
2152
2179
|
description: describeEngine('the current stable version of Safari'),
|
|
2153
|
-
aliasFor: '
|
|
2180
|
+
aliasFor: 'SAFARI_17_4',
|
|
2154
2181
|
},
|
|
2155
|
-
|
|
2182
|
+
SAFARI_17_4:
|
|
2156
2183
|
{
|
|
2157
|
-
inherits: '
|
|
2158
|
-
versions: [['
|
|
2159
|
-
includes: {
|
|
2184
|
+
inherits: 'SAFARI_15_4',
|
|
2185
|
+
versions: [['17.4']],
|
|
2186
|
+
includes: { FUNCTION_19_LF: true, FUNCTION_22_LF: false },
|
|
2160
2187
|
},
|
|
2161
2188
|
};
|
|
2162
2189
|
(function ()
|
|
@@ -3111,6 +3138,7 @@
|
|
|
3111
3138
|
var NO_IE_SRC = Feature.NO_IE_SRC;
|
|
3112
3139
|
var NO_OLD_SAFARI_ARRAY_ITERATOR = Feature.NO_OLD_SAFARI_ARRAY_ITERATOR;
|
|
3113
3140
|
var NO_V8_SRC = Feature.NO_V8_SRC;
|
|
3141
|
+
var OBJECT_ARRAY_ENTRIES_CTOR = Feature.OBJECT_ARRAY_ENTRIES_CTOR;
|
|
3114
3142
|
var OBJECT_L_LOCATION_CTOR = Feature.OBJECT_L_LOCATION_CTOR;
|
|
3115
3143
|
var OBJECT_UNDEFINED = Feature.OBJECT_UNDEFINED;
|
|
3116
3144
|
var OBJECT_W_CTOR = Feature.OBJECT_W_CTOR;
|
|
@@ -4072,7 +4100,7 @@
|
|
|
4072
4100
|
[
|
|
4073
4101
|
define('PLAIN_OBJECT.constructor'),
|
|
4074
4102
|
define('Intl.constructor', INTL),
|
|
4075
|
-
define('[].entries().constructor',
|
|
4103
|
+
define('[].entries().constructor', OBJECT_ARRAY_ENTRIES_CTOR),
|
|
4076
4104
|
],
|
|
4077
4105
|
RegExp:
|
|
4078
4106
|
[
|
|
@@ -5274,6 +5302,7 @@
|
|
|
5274
5302
|
var UNRETURNABLE_WORDS =
|
|
5275
5303
|
[
|
|
5276
5304
|
'arguments', // shadowed in function body
|
|
5305
|
+
'await', // may be an identifier in non-strict mode
|
|
5277
5306
|
'debugger', // : debugger;
|
|
5278
5307
|
'delete', // : delete(x);
|
|
5279
5308
|
'if', // : if(x);
|