jscrewit 2.38.0 → 2.40.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 +13 -6
- package/api-doc/README.md +2 -5
- package/api-doc/interfaces/CustomFeature.md +15 -9
- package/api-doc/interfaces/ElementaryFeature.md +14 -8
- package/api-doc/interfaces/EncodeOptions.md +2 -2
- package/api-doc/interfaces/Feature.md +14 -8
- package/api-doc/interfaces/FeatureAll.md +90 -16
- package/api-doc/interfaces/FeatureConstructor.md +145 -31
- package/api-doc/interfaces/PredefinedFeature.md +14 -8
- package/api-doc/interfaces/default.md +1 -1
- package/api-doc/interfaces/encode.md +8 -4
- package/api-doc/type-aliases/ElementaryFeatureName.md +2 -2
- package/api-doc/type-aliases/FeatureElement.md +2 -2
- package/api-doc/type-aliases/FeatureElementOrCompatibleArray.md +2 -2
- package/api-doc/type-aliases/PredefinedFeatureName.md +2 -2
- package/api-doc/type-aliases/RunAs.md +3 -3
- package/api-doc/variables/Feature.md +1 -1
- package/api-doc/variables/default.md +1 -1
- package/api-doc/variables/encode.md +7 -0
- package/lib/feature-all.d.ts +68 -15
- package/lib/jscrewit.d.ts +3 -3
- package/lib/jscrewit.js +149 -74
- package/lib/jscrewit.min.js +2 -2
- package/package.json +3 -2
- package/ui/ui.js +1 -1
- package/api-doc/functions/encode.md +0 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -15,11 +15,13 @@ Creates a new feature object from the union of the specified features.
|
|
|
15
15
|
The constructor can be used with or without the `new` operator, e.g.
|
|
16
16
|
`new JScrewIt.Feature(feature1, feature2)` or `JScrewIt.Feature(feature1, feature2)`.
|
|
17
17
|
If no arguments are specified, the new feature object will be equivalent to
|
|
18
|
-
[
|
|
18
|
+
[\`DEFAULT\`](#default).
|
|
19
19
|
|
|
20
20
|
## Parameters
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
### features
|
|
23
|
+
|
|
24
|
+
...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
|
|
23
25
|
|
|
24
26
|
## Returns
|
|
25
27
|
|
|
@@ -28,7 +30,7 @@ If no arguments are specified, the new feature object will be equivalent to
|
|
|
28
30
|
## Example
|
|
29
31
|
|
|
30
32
|
The following statements are equivalent, and will all construct a new feature object
|
|
31
|
-
including both [
|
|
33
|
+
including both [\`ANY\_DOCUMENT\`](#any_document) and [\`ANY\_WINDOW\`](#any_window).
|
|
32
34
|
|
|
33
35
|
```js
|
|
34
36
|
new JScrewIt.Feature("ANY_DOCUMENT", "ANY_WINDOW");
|
|
@@ -48,7 +50,7 @@ An error is thrown if any of the specified features are not mutually compatible.
|
|
|
48
50
|
|
|
49
51
|
## Constructors
|
|
50
52
|
|
|
51
|
-
###
|
|
53
|
+
### Constructor
|
|
52
54
|
|
|
53
55
|
> **new FeatureConstructor**(...`features`): [`CustomFeature`](CustomFeature.md)
|
|
54
56
|
|
|
@@ -57,11 +59,13 @@ Creates a new feature object from the union of the specified features.
|
|
|
57
59
|
The constructor can be used with or without the `new` operator, e.g.
|
|
58
60
|
`new JScrewIt.Feature(feature1, feature2)` or `JScrewIt.Feature(feature1, feature2)`.
|
|
59
61
|
If no arguments are specified, the new feature object will be equivalent to
|
|
60
|
-
[
|
|
62
|
+
[\`DEFAULT\`](#default).
|
|
61
63
|
|
|
62
64
|
#### Parameters
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
##### features
|
|
67
|
+
|
|
68
|
+
...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
|
|
65
69
|
|
|
66
70
|
#### Returns
|
|
67
71
|
|
|
@@ -70,7 +74,7 @@ If no arguments are specified, the new feature object will be equivalent to
|
|
|
70
74
|
#### Example
|
|
71
75
|
|
|
72
76
|
The following statements are equivalent, and will all construct a new feature object
|
|
73
|
-
including both [
|
|
77
|
+
including both [\`ANY\_DOCUMENT\`](#any_document) and [\`ANY\_WINDOW\`](#any_window).
|
|
74
78
|
|
|
75
79
|
```js
|
|
76
80
|
JScrewIt.Feature("ANY_DOCUMENT", "ANY_WINDOW");
|
|
@@ -418,6 +422,20 @@ Available in Internet Explorer 10+, Safari before 14.1, and Android Browser. Thi
|
|
|
418
422
|
|
|
419
423
|
***
|
|
420
424
|
|
|
425
|
+
### CREATE\_ELEMENT
|
|
426
|
+
|
|
427
|
+
> **CREATE\_ELEMENT**: [`ElementaryFeature`](ElementaryFeature.md)
|
|
428
|
+
|
|
429
|
+
Existence of the function document.createElement.
|
|
430
|
+
|
|
431
|
+
An alias for `ANY_DOCUMENT`.
|
|
432
|
+
|
|
433
|
+
#### Inherited from
|
|
434
|
+
|
|
435
|
+
[`FeatureAll`](FeatureAll.md).[`CREATE_ELEMENT`](FeatureAll.md#create_element)
|
|
436
|
+
|
|
437
|
+
***
|
|
438
|
+
|
|
421
439
|
### DEFAULT
|
|
422
440
|
|
|
423
441
|
> **DEFAULT**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
@@ -556,7 +574,7 @@ Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Node.j
|
|
|
556
574
|
|
|
557
575
|
Features available in the current stable version of Firefox.
|
|
558
576
|
|
|
559
|
-
An alias for `
|
|
577
|
+
An alias for `FF_134`.
|
|
560
578
|
|
|
561
579
|
#### Inherited from
|
|
562
580
|
|
|
@@ -568,11 +586,11 @@ An alias for `FF_131`.
|
|
|
568
586
|
|
|
569
587
|
> **FF\_131**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
570
588
|
|
|
571
|
-
Features available in Firefox 131
|
|
589
|
+
Features available in Firefox 131 to 133.
|
|
572
590
|
|
|
573
591
|
#### Remarks
|
|
574
592
|
|
|
575
|
-
This feature may be replaced or removed in the near future when current browser versions become obsolete.
|
|
593
|
+
This feature may be replaced or removed in the near future when current browser versions become obsolete.
|
|
576
594
|
|
|
577
595
|
#### See
|
|
578
596
|
|
|
@@ -584,6 +602,26 @@ This feature may be replaced or removed in the near future when current browser
|
|
|
584
602
|
|
|
585
603
|
***
|
|
586
604
|
|
|
605
|
+
### FF\_134
|
|
606
|
+
|
|
607
|
+
> **FF\_134**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
608
|
+
|
|
609
|
+
Features available in Firefox 134 or later.
|
|
610
|
+
|
|
611
|
+
#### Remarks
|
|
612
|
+
|
|
613
|
+
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF` or `FF_PREV` instead of `FF_134` for long term support.
|
|
614
|
+
|
|
615
|
+
#### See
|
|
616
|
+
|
|
617
|
+
[Engine Support Policy](https://github.com/fasttime/JScrewIt#engine-support-policy)
|
|
618
|
+
|
|
619
|
+
#### Inherited from
|
|
620
|
+
|
|
621
|
+
[`FeatureAll`](FeatureAll.md).[`FF_134`](FeatureAll.md#ff_134)
|
|
622
|
+
|
|
623
|
+
***
|
|
624
|
+
|
|
587
625
|
### FF\_90
|
|
588
626
|
|
|
589
627
|
> **FF\_90**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
@@ -592,7 +630,7 @@ Features available in Firefox 90 to 130.
|
|
|
592
630
|
|
|
593
631
|
#### Remarks
|
|
594
632
|
|
|
595
|
-
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF_ESR`
|
|
633
|
+
This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF_ESR` instead of `FF_90` for long term support.
|
|
596
634
|
|
|
597
635
|
#### See
|
|
598
636
|
|
|
@@ -624,7 +662,7 @@ An alias for `FF_90`.
|
|
|
624
662
|
|
|
625
663
|
Features available in the previous to current version of Firefox.
|
|
626
664
|
|
|
627
|
-
An alias for `
|
|
665
|
+
An alias for `FF_134`.
|
|
628
666
|
|
|
629
667
|
#### Inherited from
|
|
630
668
|
|
|
@@ -682,6 +720,20 @@ Available in Chrome, Edge, Firefox, Safari 12+, Opera, and Node.js 11+.
|
|
|
682
720
|
|
|
683
721
|
***
|
|
684
722
|
|
|
723
|
+
### FORMS
|
|
724
|
+
|
|
725
|
+
> **FORMS**: [`ElementaryFeature`](ElementaryFeature.md)
|
|
726
|
+
|
|
727
|
+
Existence of the object document.forms with string representation "\[object HTMLCollection\]".
|
|
728
|
+
|
|
729
|
+
An alias for `ANY_DOCUMENT`.
|
|
730
|
+
|
|
731
|
+
#### Inherited from
|
|
732
|
+
|
|
733
|
+
[`FeatureAll`](FeatureAll.md).[`FORMS`](FeatureAll.md#forms)
|
|
734
|
+
|
|
735
|
+
***
|
|
736
|
+
|
|
685
737
|
### FROM\_CODE\_POINT
|
|
686
738
|
|
|
687
739
|
> **FROM\_CODE\_POINT**: [`ElementaryFeature`](ElementaryFeature.md)
|
|
@@ -918,7 +970,7 @@ Availability of iterator helpers.
|
|
|
918
970
|
|
|
919
971
|
#### Remarks
|
|
920
972
|
|
|
921
|
-
Available in Chrome, Edge, Firefox 131+, Opera, and Node.js 22+.
|
|
973
|
+
Available in Chrome, Edge, Firefox 131+, Safari 18.4+, Opera, and Node.js 22.0+.
|
|
922
974
|
|
|
923
975
|
#### Inherited from
|
|
924
976
|
|
|
@@ -974,17 +1026,33 @@ Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10.0+, Opera, A
|
|
|
974
1026
|
|
|
975
1027
|
***
|
|
976
1028
|
|
|
1029
|
+
### LOCALE\_NUMERALS\_BN
|
|
1030
|
+
|
|
1031
|
+
> **LOCALE\_NUMERALS\_BN**: [`ElementaryFeature`](ElementaryFeature.md)
|
|
1032
|
+
|
|
1033
|
+
Localized number formatting for Bengali.
|
|
1034
|
+
|
|
1035
|
+
#### Remarks
|
|
1036
|
+
|
|
1037
|
+
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10.0+ before 18.4, Opera, Android Browser 4.4, and Node.js 13+.
|
|
1038
|
+
|
|
1039
|
+
#### Inherited from
|
|
1040
|
+
|
|
1041
|
+
[`FeatureAll`](FeatureAll.md).[`LOCALE_NUMERALS_BN`](FeatureAll.md#locale_numerals_bn)
|
|
1042
|
+
|
|
1043
|
+
***
|
|
1044
|
+
|
|
977
1045
|
### LOCALE\_NUMERALS\_EXT
|
|
978
1046
|
|
|
979
1047
|
> **LOCALE\_NUMERALS\_EXT**: [`ElementaryFeature`](ElementaryFeature.md)
|
|
980
1048
|
|
|
981
1049
|
Extended localized number formatting.
|
|
982
1050
|
|
|
983
|
-
This includes all features of LOCALE_NUMERALS plus the output of the first three letters in the second word of the Arabic string representation of NaN \("رقم"\),
|
|
1051
|
+
This includes all features of LOCALE_NUMERALS plus the output of the first three letters in the second word of the Arabic string representation of NaN \("رقم"\), the letters in the Russian string representation of NaN \("не число"\) and the letters in the Persian string representation of NaN \("ناعدد"\).
|
|
984
1052
|
|
|
985
1053
|
#### Remarks
|
|
986
1054
|
|
|
987
|
-
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 13+.
|
|
1055
|
+
Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 13+. This feature is not available inside web workers in Safari 18.4+.
|
|
988
1056
|
|
|
989
1057
|
#### Inherited from
|
|
990
1058
|
|
|
@@ -1220,7 +1288,7 @@ Features available in Node.js 16.6 to 21.
|
|
|
1220
1288
|
|
|
1221
1289
|
> **NODE\_22**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
1222
1290
|
|
|
1223
|
-
Features available in Node.js 22
|
|
1291
|
+
Features available in Node.js 22.0 to 22.11 and Node.js 23.0 to 23.2.
|
|
1224
1292
|
|
|
1225
1293
|
#### Inherited from
|
|
1226
1294
|
|
|
@@ -1228,6 +1296,18 @@ Features available in Node.js 22 or later.
|
|
|
1228
1296
|
|
|
1229
1297
|
***
|
|
1230
1298
|
|
|
1299
|
+
### NODE\_22\_12
|
|
1300
|
+
|
|
1301
|
+
> **NODE\_22\_12**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
1302
|
+
|
|
1303
|
+
Features available in Node.js 22.12 to 22.14 and Node.js 23.3 or later.
|
|
1304
|
+
|
|
1305
|
+
#### Inherited from
|
|
1306
|
+
|
|
1307
|
+
[`FeatureAll`](FeatureAll.md).[`NODE_22_12`](FeatureAll.md#node_22_12)
|
|
1308
|
+
|
|
1309
|
+
***
|
|
1310
|
+
|
|
1231
1311
|
### NODE\_4
|
|
1232
1312
|
|
|
1233
1313
|
> **NODE\_4**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
@@ -1264,6 +1344,20 @@ Features available in Node.js 7.6 to 9.
|
|
|
1264
1344
|
|
|
1265
1345
|
***
|
|
1266
1346
|
|
|
1347
|
+
### NODE\_NAME
|
|
1348
|
+
|
|
1349
|
+
> **NODE\_NAME**: [`ElementaryFeature`](ElementaryFeature.md)
|
|
1350
|
+
|
|
1351
|
+
Existence of the string document.nodeName that starts with a number sign \("#"\).
|
|
1352
|
+
|
|
1353
|
+
An alias for `ANY_DOCUMENT`.
|
|
1354
|
+
|
|
1355
|
+
#### Inherited from
|
|
1356
|
+
|
|
1357
|
+
[`FeatureAll`](FeatureAll.md).[`NODE_NAME`](FeatureAll.md#node_name)
|
|
1358
|
+
|
|
1359
|
+
***
|
|
1360
|
+
|
|
1267
1361
|
### NODECONSTRUCTOR
|
|
1268
1362
|
|
|
1269
1363
|
> **NODECONSTRUCTOR**: [`ElementaryFeature`](ElementaryFeature.md)
|
|
@@ -1288,7 +1382,7 @@ The property that the Array.prototype.entries\(\).constructor is the Object cons
|
|
|
1288
1382
|
|
|
1289
1383
|
#### Remarks
|
|
1290
1384
|
|
|
1291
|
-
Available in Firefox before 131, Safari 9
|
|
1385
|
+
Available in Firefox before 131, Safari 9+ before 18.4, and Node.js 0.12+ before 22.0.
|
|
1292
1386
|
|
|
1293
1387
|
#### Inherited from
|
|
1294
1388
|
|
|
@@ -1398,7 +1492,7 @@ Available in Chrome, Edge, Firefox, Safari 13+, Opera, and Node.js 12+.
|
|
|
1398
1492
|
|
|
1399
1493
|
Features available in the current stable version of Safari.
|
|
1400
1494
|
|
|
1401
|
-
An alias for `
|
|
1495
|
+
An alias for `SAFARI_18_4`.
|
|
1402
1496
|
|
|
1403
1497
|
#### Inherited from
|
|
1404
1498
|
|
|
@@ -1502,15 +1596,27 @@ Features available in Safari 17.4 to 17.6.
|
|
|
1502
1596
|
|
|
1503
1597
|
***
|
|
1504
1598
|
|
|
1505
|
-
### SAFARI\_18
|
|
1599
|
+
### SAFARI\_18\_0
|
|
1506
1600
|
|
|
1507
|
-
> **SAFARI\_18**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
1601
|
+
> **SAFARI\_18\_0**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
1508
1602
|
|
|
1509
|
-
Features available in Safari 18
|
|
1603
|
+
Features available in Safari 18.0 to 18.3.
|
|
1510
1604
|
|
|
1511
1605
|
#### Inherited from
|
|
1512
1606
|
|
|
1513
|
-
[`FeatureAll`](FeatureAll.md).[`
|
|
1607
|
+
[`FeatureAll`](FeatureAll.md).[`SAFARI_18_0`](FeatureAll.md#safari_18_0)
|
|
1608
|
+
|
|
1609
|
+
***
|
|
1610
|
+
|
|
1611
|
+
### SAFARI\_18\_4
|
|
1612
|
+
|
|
1613
|
+
> **SAFARI\_18\_4**: [`PredefinedFeature`](PredefinedFeature.md)
|
|
1614
|
+
|
|
1615
|
+
Features available in Safari 18.4 or later.
|
|
1616
|
+
|
|
1617
|
+
#### Inherited from
|
|
1618
|
+
|
|
1619
|
+
[`FeatureAll`](FeatureAll.md).[`SAFARI_18_4`](FeatureAll.md#safari_18_4)
|
|
1514
1620
|
|
|
1515
1621
|
***
|
|
1516
1622
|
|
|
@@ -1586,7 +1692,7 @@ Support for the two-letter locale name "ar" to format decimal numbers as Arabic
|
|
|
1586
1692
|
|
|
1587
1693
|
#### Remarks
|
|
1588
1694
|
|
|
1589
|
-
Available in Firefox, Internet Explorer 11, Safari 10.0+ before 18, Android Browser 4.4, and Node.js 13
|
|
1695
|
+
Available in Firefox before 134, Internet Explorer 11, Safari 10.0+ before 18.0, Android Browser 4.4, and Node.js 13+ before 22.12–22.14 and 23.3.
|
|
1590
1696
|
|
|
1591
1697
|
#### Inherited from
|
|
1592
1698
|
|
|
@@ -1670,7 +1776,9 @@ Determines whether the specified features are mutually compatible.
|
|
|
1670
1776
|
|
|
1671
1777
|
#### Parameters
|
|
1672
1778
|
|
|
1673
|
-
|
|
1779
|
+
##### features
|
|
1780
|
+
|
|
1781
|
+
...[`FeatureElement`](../type-aliases/FeatureElement.md)[]
|
|
1674
1782
|
|
|
1675
1783
|
#### Returns
|
|
1676
1784
|
|
|
@@ -1704,7 +1812,9 @@ features, regardless of any other difference.
|
|
|
1704
1812
|
|
|
1705
1813
|
#### Parameters
|
|
1706
1814
|
|
|
1707
|
-
|
|
1815
|
+
##### features
|
|
1816
|
+
|
|
1817
|
+
...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
|
|
1708
1818
|
|
|
1709
1819
|
#### Returns
|
|
1710
1820
|
|
|
@@ -1735,7 +1845,9 @@ Creates a new feature object equivalent to the intersection of the specified fea
|
|
|
1735
1845
|
|
|
1736
1846
|
#### Parameters
|
|
1737
1847
|
|
|
1738
|
-
|
|
1848
|
+
##### features
|
|
1849
|
+
|
|
1850
|
+
...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
|
|
1739
1851
|
|
|
1740
1852
|
#### Returns
|
|
1741
1853
|
|
|
@@ -1745,14 +1857,14 @@ A feature object, or `null` if no arguments are specified.
|
|
|
1745
1857
|
|
|
1746
1858
|
#### Example
|
|
1747
1859
|
|
|
1748
|
-
This will create a new feature object equivalent to [
|
|
1860
|
+
This will create a new feature object equivalent to [\`NAME\`](#name).
|
|
1749
1861
|
|
|
1750
1862
|
```js
|
|
1751
1863
|
const newFeature = JScrewIt.Feature.commonOf(["ATOB", "NAME"], ["NAME", "SELF"]);
|
|
1752
1864
|
```
|
|
1753
1865
|
|
|
1754
|
-
This will create a new feature object equivalent to [FeatureConstructor.
|
|
1755
|
-
This is because both [
|
|
1866
|
+
This will create a new feature object equivalent to [FeatureConstructor.ANY\_WINDOW \| \`ANY\_WINDOW\`](#any_window).
|
|
1867
|
+
This is because both [\`DOMWINDOW\`](#domwindow) and [\`WINDOW\`](#window) imply [FeatureConstructor.ANY\_WINDOW \| \`ANY\_WINDOW\`](#any_window).
|
|
1756
1868
|
|
|
1757
1869
|
```js
|
|
1758
1870
|
const newFeature = JScrewIt.Feature.commonOf("DOMWINDOW", "WINDOW");
|
|
@@ -1768,7 +1880,9 @@ Returns a short description of a predefined feature in plain English.
|
|
|
1768
1880
|
|
|
1769
1881
|
#### Parameters
|
|
1770
1882
|
|
|
1771
|
-
|
|
1883
|
+
##### name
|
|
1884
|
+
|
|
1885
|
+
keyof [`FeatureAll`](FeatureAll.md)
|
|
1772
1886
|
|
|
1773
1887
|
A name or alias of a predefined feature.
|
|
1774
1888
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ Objects of this type indicate which of the capabilities that JScrewIt can use to
|
|
|
8
8
|
length of its output are available in a particular JavaScript engine.
|
|
9
9
|
|
|
10
10
|
JScrewIt comes with a set of predefined feature objects exposed as property values of
|
|
11
|
-
`JScrewIt.Feature` or [
|
|
11
|
+
`JScrewIt.Feature` or [\`JScrewIt.Feature.ALL\`](FeatureConstructor.md#all), where the property
|
|
12
12
|
name is the feature's name or alias.
|
|
13
13
|
|
|
14
14
|
Besides these predefined features, it is possible to construct custom features from the union or
|
|
@@ -20,8 +20,8 @@ they are different from such a union in that they exclude some other feature not
|
|
|
20
20
|
their elementary components.
|
|
21
21
|
All other features, called *composite* features, can be constructed as a union of zero or more
|
|
22
22
|
elementary features.
|
|
23
|
-
Two of the predefined composite features are particularly important: [
|
|
24
|
-
feature is available at all; [
|
|
23
|
+
Two of the predefined composite features are particularly important: [\`DEFAULT\`](FeatureConstructor.md#default) is the empty feature, indicating that no elementary
|
|
24
|
+
feature is available at all; [\`AUTO\`](FeatureConstructor.md#auto) is the union of all
|
|
25
25
|
elementary features available in the current environment.
|
|
26
26
|
|
|
27
27
|
Not all features can be available at the same time: some features are necessarily incompatible,
|
|
@@ -97,7 +97,9 @@ Determines whether this feature object includes all of the specified features.
|
|
|
97
97
|
|
|
98
98
|
#### Parameters
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
##### features
|
|
101
|
+
|
|
102
|
+
...[`FeatureElementOrCompatibleArray`](../type-aliases/FeatureElementOrCompatibleArray.md)[]
|
|
101
103
|
|
|
102
104
|
#### Returns
|
|
103
105
|
|
|
@@ -114,7 +116,7 @@ If no arguments are specified, the return value is `true`.
|
|
|
114
116
|
|
|
115
117
|
### restrict()
|
|
116
118
|
|
|
117
|
-
> **restrict**(`environment`, `engineFeatureObjs
|
|
119
|
+
> **restrict**(`environment`, `engineFeatureObjs?`): [`CustomFeature`](CustomFeature.md)
|
|
118
120
|
|
|
119
121
|
Creates a new feature object from this feature by removing elementary features that are not
|
|
120
122
|
available inside a particular environment.
|
|
@@ -124,7 +126,7 @@ that require strict mode code, or inside web workers.
|
|
|
124
126
|
|
|
125
127
|
#### Parameters
|
|
126
128
|
|
|
127
|
-
|
|
129
|
+
##### environment
|
|
128
130
|
|
|
129
131
|
The environment to which this feature should be restricted.
|
|
130
132
|
Two environments are currently supported.
|
|
@@ -141,7 +143,11 @@ Removes features that are not available in environments that require strict mode
|
|
|
141
143
|
|
|
142
144
|
</dl>
|
|
143
145
|
|
|
144
|
-
|
|
146
|
+
`"forced-strict-mode"` | `"web-worker"`
|
|
147
|
+
|
|
148
|
+
##### engineFeatureObjs?
|
|
149
|
+
|
|
150
|
+
readonly `PredefinedFeature`[]
|
|
145
151
|
|
|
146
152
|
An array of predefined feature objects, each corresponding to a particular engine in which
|
|
147
153
|
the restriction should be enacted.
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
5
|
# Interface: encode()
|
|
6
6
|
|
|
7
|
-
> **encode**(`input`, `options
|
|
7
|
+
> **encode**(`input`, `options?`): `string`
|
|
8
8
|
|
|
9
9
|
Encodes a given string into JSFuck.
|
|
10
10
|
|
|
11
11
|
## Parameters
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### input
|
|
14
|
+
|
|
15
|
+
`string`
|
|
14
16
|
|
|
15
17
|
The string to encode.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
### options?
|
|
20
|
+
|
|
21
|
+
[`EncodeOptions`](EncodeOptions.md)
|
|
18
22
|
|
|
19
23
|
An optional object specifying encoding options.
|
|
20
24
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
5
|
# Type Alias: ElementaryFeatureName
|
|
6
6
|
|
|
7
|
-
> **ElementaryFeatureName
|
|
7
|
+
> **ElementaryFeatureName** = `"ANY_DOCUMENT"` \| `"ANY_WINDOW"` \| `"ARRAY_ITERATOR"` \| `"ARROW"` \| `"ASYNC_FUNCTION"` \| `"AT"` \| `"ATOB"` \| `"BARPROP"` \| `"CALL_ON_GLOBAL"` \| `"CAPITAL_HTML"` \| `"CONSOLE"` \| `"DOCUMENT"` \| `"DOMWINDOW"` \| `"ESC_HTML_ALL"` \| `"ESC_HTML_QUOT"` \| `"ESC_HTML_QUOT_ONLY"` \| `"ESC_REGEXP_LF"` \| `"ESC_REGEXP_SLASH"` \| `"FF_SRC"` \| `"FILL"` \| `"FLAT"` \| `"FROM_CODE_POINT"` \| `"FUNCTION_19_LF"` \| `"FUNCTION_22_LF"` \| `"GENERIC_ARRAY_TO_STRING"` \| `"GLOBAL_UNDEFINED"` \| `"GMT"` \| `"HISTORY"` \| `"HTMLAUDIOELEMENT"` \| `"IE_SRC"` \| `"INCR_CHAR"` \| `"INTL"` \| `"ITERATOR_HELPER"` \| `"JAPANESE_INFINITY"` \| `"LOCALE_INFINITY"` \| `"LOCALE_NUMERALS"` \| `"LOCALE_NUMERALS_BN"` \| `"LOCALE_NUMERALS_EXT"` \| `"LOCATION"` \| `"MOZILLA"` \| `"NAME"` \| `"NODECONSTRUCTOR"` \| `"NO_FF_SRC"` \| `"NO_IE_SRC"` \| `"NO_OLD_SAFARI_ARRAY_ITERATOR"` \| `"NO_V8_SRC"` \| `"OBJECT_ARRAY_ENTRIES_CTOR"` \| `"OBJECT_L_LOCATION_CTOR"` \| `"OBJECT_UNDEFINED"` \| `"OBJECT_W_SELF"` \| `"OLD_SAFARI_LOCATION_CTOR"` \| `"PLAIN_INTL"` \| `"REGEXP_STRING_ITERATOR"` \| `"SELF_OBJ"` \| `"SHORT_LOCALES"` \| `"STATUS"` \| `"UNDEFINED"` \| `"V8_SRC"` \| `"WINDOW"`
|
|
8
8
|
|
|
9
9
|
Name of an elementary feature.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
5
|
# Type Alias: FeatureElement
|
|
6
6
|
|
|
7
|
-
> **FeatureElement
|
|
7
|
+
> **FeatureElement** = [`Feature`](../interfaces/Feature.md) \| keyof [`FeatureAll`](../interfaces/FeatureAll.md)
|
|
8
8
|
|
|
9
9
|
A feature object or a name or alias of a predefined feature.
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
5
|
# Type Alias: FeatureElementOrCompatibleArray
|
|
6
6
|
|
|
7
|
-
> **FeatureElementOrCompatibleArray
|
|
7
|
+
> **FeatureElementOrCompatibleArray** = [`FeatureElement`](FeatureElement.md) \| readonly [`FeatureElement`](FeatureElement.md)[]
|
|
8
8
|
|
|
9
9
|
A feature object, a name or alias of a predefined feature, or an array of such values that
|
|
10
10
|
defines a union of mutually compatible features.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
5
|
# Type Alias: PredefinedFeatureName
|
|
6
6
|
|
|
7
|
-
> **PredefinedFeatureName
|
|
7
|
+
> **PredefinedFeatureName** = [`ElementaryFeatureName`](ElementaryFeatureName.md) \| `"ANDRO_4_0"` \| `"ANDRO_4_1"` \| `"ANDRO_4_4"` \| `"AUTO"` \| `"BROWSER"` \| `"CHROME_122"` \| `"COMPACT"` \| `"DEFAULT"` \| `"FF_131"` \| `"FF_134"` \| `"FF_90"` \| `"IE_10"` \| `"IE_11"` \| `"IE_11_WIN_10"` \| `"IE_9"` \| `"NODE_0_10"` \| `"NODE_0_12"` \| `"NODE_10"` \| `"NODE_11"` \| `"NODE_12"` \| `"NODE_13"` \| `"NODE_15"` \| `"NODE_16_0"` \| `"NODE_16_6"` \| `"NODE_22"` \| `"NODE_22_12"` \| `"NODE_4"` \| `"NODE_5"` \| `"NODE_7_6"` \| `"SAFARI_10_0"` \| `"SAFARI_10_1"` \| `"SAFARI_12"` \| `"SAFARI_13"` \| `"SAFARI_14_0_1"` \| `"SAFARI_14_1"` \| `"SAFARI_15_4"` \| `"SAFARI_17_4"` \| `"SAFARI_18_0"` \| `"SAFARI_18_4"` \| `"SAFARI_7_0"` \| `"SAFARI_7_1"` \| `"SAFARI_9"`
|
|
8
8
|
|
|
9
9
|
Name of a predefined feature.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
[**JScrewIt**](../README.md)
|
|
1
|
+
[**JScrewIt**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
5
|
# Type Alias: RunAs
|
|
6
6
|
|
|
7
|
-
> **RunAs
|
|
7
|
+
> **RunAs** = `"call"` \| `"eval"` \| `"express"` \| `"express-call"` \| `"express-eval"` \| `"none"`
|
|
8
8
|
|
|
9
9
|
Values of this type control the type of code generated from a given input.
|
|
10
|
-
See [
|
|
10
|
+
See [\`EncodeOptions.runAs\`](../interfaces/EncodeOptions.md#runas) for the meaning of each possible value.
|