jscrewit 2.37.0 → 2.38.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 +45 -28
- package/api-doc/README.md +15 -109
- package/api-doc/functions/encode.md +35 -0
- package/api-doc/interfaces/CustomFeature.md +47 -43
- package/api-doc/interfaces/ElementaryFeature.md +46 -42
- package/api-doc/interfaces/EncodeOptions.md +14 -19
- package/api-doc/interfaces/Feature.md +43 -40
- package/api-doc/interfaces/FeatureAll.md +409 -420
- package/api-doc/interfaces/FeatureConstructor.md +587 -593
- package/api-doc/interfaces/PredefinedFeature.md +48 -42
- package/api-doc/interfaces/default.md +8 -11
- package/api-doc/interfaces/encode.md +15 -18
- package/api-doc/type-aliases/ElementaryFeatureName.md +9 -0
- package/api-doc/type-aliases/FeatureElement.md +14 -0
- package/api-doc/type-aliases/FeatureElementOrCompatibleArray.md +16 -0
- package/api-doc/type-aliases/PredefinedFeatureName.md +9 -0
- package/api-doc/type-aliases/RunAs.md +10 -0
- package/api-doc/variables/Feature.md +7 -0
- package/api-doc/variables/default.md +7 -0
- package/lib/feature-all.d.ts +102 -36
- package/lib/feature.d.ts +6 -6
- package/lib/jscrewit.js +886 -186
- package/lib/jscrewit.min.js +2 -2
- package/package.json +4 -3
- package/readme.md +14 -17
- package/ui/ui.js +1 -1
package/lib/feature-all.d.ts
CHANGED
|
@@ -43,10 +43,19 @@ export interface FeatureAll
|
|
|
43
43
|
*
|
|
44
44
|
* @remarks
|
|
45
45
|
*
|
|
46
|
-
* Available in Chrome, Edge, Firefox, Safari 10+, Opera, and Node.js 4+.
|
|
46
|
+
* Available in Chrome, Edge, Firefox, Safari 10.0+, Opera, and Node.js 4+.
|
|
47
47
|
*/
|
|
48
48
|
ARROW: ElementaryFeature;
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Support for async functions, which return Promise object.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
*
|
|
55
|
+
* Available in Chrome, Edge, Firefox, Safari 10.1+, Opera, and Node.js 7.6+.
|
|
56
|
+
*/
|
|
57
|
+
ASYNC_FUNCTION: ElementaryFeature;
|
|
58
|
+
|
|
50
59
|
/**
|
|
51
60
|
* Existence of the native function Array.prototype.at.
|
|
52
61
|
*
|
|
@@ -61,7 +70,7 @@ export interface FeatureAll
|
|
|
61
70
|
*
|
|
62
71
|
* @remarks
|
|
63
72
|
*
|
|
64
|
-
* Available in Chrome, Edge, Firefox, Internet Explorer 10+, Safari, Opera, Android Browser, and Node.js 16.0+. This feature is not available inside web workers in Safari before 10.
|
|
73
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer 10+, Safari, Opera, Android Browser, and Node.js 16.0+. This feature is not available inside web workers in Safari before 10.0.
|
|
65
74
|
*/
|
|
66
75
|
ATOB: ElementaryFeature;
|
|
67
76
|
|
|
@@ -84,6 +93,15 @@ export interface FeatureAll
|
|
|
84
93
|
*/
|
|
85
94
|
BROWSER: PredefinedFeature;
|
|
86
95
|
|
|
96
|
+
/**
|
|
97
|
+
* The ability to call a function on the global object when invoking Function.prototype.call without binding.
|
|
98
|
+
*
|
|
99
|
+
* @remarks
|
|
100
|
+
*
|
|
101
|
+
* Available in Android Browser before 4.1.
|
|
102
|
+
*/
|
|
103
|
+
CALL_ON_GLOBAL: ElementaryFeature;
|
|
104
|
+
|
|
87
105
|
/**
|
|
88
106
|
* The property that the various string methods returning HTML code such as String.prototype.big or String.prototype.link have both the tag name and attributes written in capital letters.
|
|
89
107
|
*
|
|
@@ -207,16 +225,29 @@ export interface FeatureAll
|
|
|
207
225
|
/**
|
|
208
226
|
* Features available in the current stable version of Firefox.
|
|
209
227
|
*
|
|
210
|
-
* An alias for `
|
|
228
|
+
* An alias for `FF_131`.
|
|
211
229
|
*/
|
|
212
230
|
FF: PredefinedFeature;
|
|
213
231
|
|
|
214
232
|
/**
|
|
215
|
-
* Features available in Firefox
|
|
233
|
+
* Features available in Firefox 131 or later.
|
|
216
234
|
*
|
|
217
235
|
* @remarks
|
|
218
236
|
*
|
|
219
|
-
* This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF
|
|
237
|
+
* This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF` instead of `FF_131` for long term support.
|
|
238
|
+
*
|
|
239
|
+
* @see
|
|
240
|
+
*
|
|
241
|
+
* [Engine Support Policy](https://github.com/fasttime/JScrewIt#engine-support-policy)
|
|
242
|
+
*/
|
|
243
|
+
FF_131: PredefinedFeature;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Features available in Firefox 90 to 130.
|
|
247
|
+
*
|
|
248
|
+
* @remarks
|
|
249
|
+
*
|
|
250
|
+
* This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF_ESR` or `FF_PREV` instead of `FF_90` for long term support.
|
|
220
251
|
*
|
|
221
252
|
* @see
|
|
222
253
|
*
|
|
@@ -341,15 +372,6 @@ export interface FeatureAll
|
|
|
341
372
|
*/
|
|
342
373
|
HTMLAUDIOELEMENT: ElementaryFeature;
|
|
343
374
|
|
|
344
|
-
/**
|
|
345
|
-
* Existence of the global object document having the string representation "\[object HTMLDocument\]".
|
|
346
|
-
*
|
|
347
|
-
* @remarks
|
|
348
|
-
*
|
|
349
|
-
* Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari, Opera, and Android Browser. This feature is not available inside web workers.
|
|
350
|
-
*/
|
|
351
|
-
HTMLDOCUMENT: ElementaryFeature;
|
|
352
|
-
|
|
353
375
|
/** Features available in Internet Explorer 10. */
|
|
354
376
|
IE_10: PredefinedFeature;
|
|
355
377
|
|
|
@@ -387,16 +409,34 @@ export interface FeatureAll
|
|
|
387
409
|
*
|
|
388
410
|
* @remarks
|
|
389
411
|
*
|
|
390
|
-
* Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10+, Opera, Android Browser 4.4, and Node.js 0.12+.
|
|
412
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 0.12+.
|
|
391
413
|
*/
|
|
392
414
|
INTL: ElementaryFeature;
|
|
393
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Availability of iterator helpers.
|
|
418
|
+
*
|
|
419
|
+
* @remarks
|
|
420
|
+
*
|
|
421
|
+
* Available in Chrome, Edge, Firefox 131+, Opera, and Node.js 22+.
|
|
422
|
+
*/
|
|
423
|
+
ITERATOR_HELPER: ElementaryFeature;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Japanese string representation of Infinity ending with "∞".
|
|
427
|
+
*
|
|
428
|
+
* @remarks
|
|
429
|
+
*
|
|
430
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 0.12+.
|
|
431
|
+
*/
|
|
432
|
+
JAPANESE_INFINITY: ElementaryFeature;
|
|
433
|
+
|
|
394
434
|
/**
|
|
395
435
|
* Language sensitive string representation of Infinity as "∞".
|
|
396
436
|
*
|
|
397
437
|
* @remarks
|
|
398
438
|
*
|
|
399
|
-
* Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10+, Opera, Android Browser 4.4, and Node.js 0.12+.
|
|
439
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 0.12+.
|
|
400
440
|
*/
|
|
401
441
|
LOCALE_INFINITY: ElementaryFeature;
|
|
402
442
|
|
|
@@ -405,7 +445,7 @@ export interface FeatureAll
|
|
|
405
445
|
*
|
|
406
446
|
* @remarks
|
|
407
447
|
*
|
|
408
|
-
* Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10+, Opera, Android Browser 4.4, and Node.js 13+.
|
|
448
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 13+.
|
|
409
449
|
*/
|
|
410
450
|
LOCALE_NUMERALS: ElementaryFeature;
|
|
411
451
|
|
|
@@ -416,7 +456,7 @@ export interface FeatureAll
|
|
|
416
456
|
*
|
|
417
457
|
* @remarks
|
|
418
458
|
*
|
|
419
|
-
* Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10+, Opera, Android Browser 4.4, and Node.js 13+.
|
|
459
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 13+.
|
|
420
460
|
*/
|
|
421
461
|
LOCALE_NUMERALS_EXT: ElementaryFeature;
|
|
422
462
|
|
|
@@ -429,6 +469,15 @@ export interface FeatureAll
|
|
|
429
469
|
*/
|
|
430
470
|
LOCATION: ElementaryFeature;
|
|
431
471
|
|
|
472
|
+
/**
|
|
473
|
+
* Existence of user agent string navigator.userAgent that starts with "Mozilla".
|
|
474
|
+
*
|
|
475
|
+
* @remarks
|
|
476
|
+
*
|
|
477
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser.
|
|
478
|
+
*/
|
|
479
|
+
MOZILLA: ElementaryFeature;
|
|
480
|
+
|
|
432
481
|
/**
|
|
433
482
|
* Existence of the name property for functions.
|
|
434
483
|
*
|
|
@@ -443,7 +492,7 @@ export interface FeatureAll
|
|
|
443
492
|
*
|
|
444
493
|
* @remarks
|
|
445
494
|
*
|
|
446
|
-
* Available in Safari before 10. This feature is not available inside web workers.
|
|
495
|
+
* Available in Safari before 10.0. This feature is not available inside web workers.
|
|
447
496
|
*/
|
|
448
497
|
NODECONSTRUCTOR: ElementaryFeature;
|
|
449
498
|
|
|
@@ -480,9 +529,12 @@ export interface FeatureAll
|
|
|
480
529
|
/** Features available in Node.js 4. */
|
|
481
530
|
NODE_4: PredefinedFeature;
|
|
482
531
|
|
|
483
|
-
/** Features available in Node.js 5 to
|
|
532
|
+
/** Features available in Node.js 5 to 7.5. */
|
|
484
533
|
NODE_5: PredefinedFeature;
|
|
485
534
|
|
|
535
|
+
/** Features available in Node.js 7.6 to 9. */
|
|
536
|
+
NODE_7_6: PredefinedFeature;
|
|
537
|
+
|
|
486
538
|
/**
|
|
487
539
|
* A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari.
|
|
488
540
|
*
|
|
@@ -528,7 +580,7 @@ export interface FeatureAll
|
|
|
528
580
|
*
|
|
529
581
|
* @remarks
|
|
530
582
|
*
|
|
531
|
-
* Available in Firefox, Safari 9+, and Node.js 0.12+ before 22.
|
|
583
|
+
* Available in Firefox before 131, Safari 9+, and Node.js 0.12+ before 22.
|
|
532
584
|
*/
|
|
533
585
|
OBJECT_ARRAY_ENTRIES_CTOR: ElementaryFeature;
|
|
534
586
|
|
|
@@ -537,7 +589,7 @@ export interface FeatureAll
|
|
|
537
589
|
*
|
|
538
590
|
* @remarks
|
|
539
591
|
*
|
|
540
|
-
* Available in Internet Explorer and Safari before 10. This feature is not available inside web workers.
|
|
592
|
+
* Available in Internet Explorer and Safari before 10.0. This feature is not available inside web workers.
|
|
541
593
|
*/
|
|
542
594
|
OBJECT_L_LOCATION_CTOR: ElementaryFeature;
|
|
543
595
|
|
|
@@ -551,20 +603,20 @@ export interface FeatureAll
|
|
|
551
603
|
OBJECT_UNDEFINED: ElementaryFeature;
|
|
552
604
|
|
|
553
605
|
/**
|
|
554
|
-
* The property that the string representation of the global object
|
|
606
|
+
* The property that the string representation of the global object self starts with "\[object W".
|
|
555
607
|
*
|
|
556
608
|
* @remarks
|
|
557
609
|
*
|
|
558
|
-
* Available in Internet Explorer and
|
|
610
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser 4.4. This feature is not available inside web workers in Chrome, Edge, Firefox, Safari, Opera, and Android Browser 4.4.
|
|
559
611
|
*/
|
|
560
|
-
|
|
612
|
+
OBJECT_W_SELF: ElementaryFeature;
|
|
561
613
|
|
|
562
614
|
/**
|
|
563
615
|
* Existence of the global object location.constructor whose string representation starts with "\[object " and ends with "LocationConstructor\]".
|
|
564
616
|
*
|
|
565
617
|
* @remarks
|
|
566
618
|
*
|
|
567
|
-
* Available in Safari before 10.
|
|
619
|
+
* Available in Safari before 10.0.
|
|
568
620
|
*/
|
|
569
621
|
OLD_SAFARI_LOCATION_CTOR: ElementaryFeature;
|
|
570
622
|
|
|
@@ -573,7 +625,7 @@ export interface FeatureAll
|
|
|
573
625
|
*
|
|
574
626
|
* @remarks
|
|
575
627
|
*
|
|
576
|
-
* Available in Internet Explorer 11, Safari 10+ before 14.0.1, Android Browser 4.4, and Node.js 0.12+ before 15.
|
|
628
|
+
* Available in Internet Explorer 11, Safari 10.0+ before 14.0.1, Android Browser 4.4, and Node.js 0.12+ before 15.
|
|
577
629
|
*/
|
|
578
630
|
PLAIN_INTL: ElementaryFeature;
|
|
579
631
|
|
|
@@ -589,12 +641,15 @@ export interface FeatureAll
|
|
|
589
641
|
/**
|
|
590
642
|
* Features available in the current stable version of Safari.
|
|
591
643
|
*
|
|
592
|
-
* An alias for `
|
|
644
|
+
* An alias for `SAFARI_18`.
|
|
593
645
|
*/
|
|
594
646
|
SAFARI: PredefinedFeature;
|
|
595
647
|
|
|
596
|
-
/** Features available in Safari 10
|
|
597
|
-
|
|
648
|
+
/** Features available in Safari 10.0. */
|
|
649
|
+
SAFARI_10_0: PredefinedFeature;
|
|
650
|
+
|
|
651
|
+
/** Features available in Safari 10.1 and Safari 11. */
|
|
652
|
+
SAFARI_10_1: PredefinedFeature;
|
|
598
653
|
|
|
599
654
|
/** Features available in Safari 12. */
|
|
600
655
|
SAFARI_12: PredefinedFeature;
|
|
@@ -611,9 +666,12 @@ export interface FeatureAll
|
|
|
611
666
|
/** Features available in Safari 15.4 to 17.3. */
|
|
612
667
|
SAFARI_15_4: PredefinedFeature;
|
|
613
668
|
|
|
614
|
-
/** Features available in Safari 17.4
|
|
669
|
+
/** Features available in Safari 17.4 to 17.6. */
|
|
615
670
|
SAFARI_17_4: PredefinedFeature;
|
|
616
671
|
|
|
672
|
+
/** Features available in Safari 18 or later. */
|
|
673
|
+
SAFARI_18: PredefinedFeature;
|
|
674
|
+
|
|
617
675
|
/** Features available in Safari 7.0. */
|
|
618
676
|
SAFARI_7_0: PredefinedFeature;
|
|
619
677
|
|
|
@@ -631,7 +689,7 @@ export interface FeatureAll
|
|
|
631
689
|
*
|
|
632
690
|
* @remarks
|
|
633
691
|
*
|
|
634
|
-
* Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser. This feature is not available inside web workers in Safari 7.1+ before 10.
|
|
692
|
+
* Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser. This feature is not available inside web workers in Safari 7.1+ before 10.0.
|
|
635
693
|
*/
|
|
636
694
|
SELF_OBJ: ElementaryFeature;
|
|
637
695
|
|
|
@@ -640,7 +698,7 @@ export interface FeatureAll
|
|
|
640
698
|
*
|
|
641
699
|
* @remarks
|
|
642
700
|
*
|
|
643
|
-
* Available in Firefox, Internet Explorer 11, Safari 10
|
|
701
|
+
* Available in Firefox, Internet Explorer 11, Safari 10.0+ before 18, Android Browser 4.4, and Node.js 13+.
|
|
644
702
|
*/
|
|
645
703
|
SHORT_LOCALES: ElementaryFeature;
|
|
646
704
|
|
|
@@ -691,9 +749,11 @@ type ElementaryFeatureName =
|
|
|
691
749
|
| 'ANY_WINDOW'
|
|
692
750
|
| 'ARRAY_ITERATOR'
|
|
693
751
|
| 'ARROW'
|
|
752
|
+
| 'ASYNC_FUNCTION'
|
|
694
753
|
| 'AT'
|
|
695
754
|
| 'ATOB'
|
|
696
755
|
| 'BARPROP'
|
|
756
|
+
| 'CALL_ON_GLOBAL'
|
|
697
757
|
| 'CAPITAL_HTML'
|
|
698
758
|
| 'CONSOLE'
|
|
699
759
|
| 'DOCUMENT'
|
|
@@ -714,14 +774,16 @@ type ElementaryFeatureName =
|
|
|
714
774
|
| 'GMT'
|
|
715
775
|
| 'HISTORY'
|
|
716
776
|
| 'HTMLAUDIOELEMENT'
|
|
717
|
-
| 'HTMLDOCUMENT'
|
|
718
777
|
| 'IE_SRC'
|
|
719
778
|
| 'INCR_CHAR'
|
|
720
779
|
| 'INTL'
|
|
780
|
+
| 'ITERATOR_HELPER'
|
|
781
|
+
| 'JAPANESE_INFINITY'
|
|
721
782
|
| 'LOCALE_INFINITY'
|
|
722
783
|
| 'LOCALE_NUMERALS'
|
|
723
784
|
| 'LOCALE_NUMERALS_EXT'
|
|
724
785
|
| 'LOCATION'
|
|
786
|
+
| 'MOZILLA'
|
|
725
787
|
| 'NAME'
|
|
726
788
|
| 'NODECONSTRUCTOR'
|
|
727
789
|
| 'NO_FF_SRC'
|
|
@@ -731,7 +793,7 @@ type ElementaryFeatureName =
|
|
|
731
793
|
| 'OBJECT_ARRAY_ENTRIES_CTOR'
|
|
732
794
|
| 'OBJECT_L_LOCATION_CTOR'
|
|
733
795
|
| 'OBJECT_UNDEFINED'
|
|
734
|
-
| '
|
|
796
|
+
| 'OBJECT_W_SELF'
|
|
735
797
|
| 'OLD_SAFARI_LOCATION_CTOR'
|
|
736
798
|
| 'PLAIN_INTL'
|
|
737
799
|
| 'REGEXP_STRING_ITERATOR'
|
|
@@ -754,6 +816,7 @@ ElementaryFeatureName
|
|
|
754
816
|
| 'CHROME_122'
|
|
755
817
|
| 'COMPACT'
|
|
756
818
|
| 'DEFAULT'
|
|
819
|
+
| 'FF_131'
|
|
757
820
|
| 'FF_90'
|
|
758
821
|
| 'IE_10'
|
|
759
822
|
| 'IE_11'
|
|
@@ -771,13 +834,16 @@ ElementaryFeatureName
|
|
|
771
834
|
| 'NODE_22'
|
|
772
835
|
| 'NODE_4'
|
|
773
836
|
| 'NODE_5'
|
|
774
|
-
| '
|
|
837
|
+
| 'NODE_7_6'
|
|
838
|
+
| 'SAFARI_10_0'
|
|
839
|
+
| 'SAFARI_10_1'
|
|
775
840
|
| 'SAFARI_12'
|
|
776
841
|
| 'SAFARI_13'
|
|
777
842
|
| 'SAFARI_14_0_1'
|
|
778
843
|
| 'SAFARI_14_1'
|
|
779
844
|
| 'SAFARI_15_4'
|
|
780
845
|
| 'SAFARI_17_4'
|
|
846
|
+
| 'SAFARI_18'
|
|
781
847
|
| 'SAFARI_7_0'
|
|
782
848
|
| 'SAFARI_7_1'
|
|
783
849
|
| 'SAFARI_9'
|
package/lib/feature.d.ts
CHANGED
|
@@ -261,14 +261,14 @@ export interface FeatureConstructor extends FeatureAll
|
|
|
261
261
|
* const newFeature = JScrewIt.Feature.commonOf(["ATOB", "NAME"], ["NAME", "SELF"]);
|
|
262
262
|
* ```
|
|
263
263
|
*
|
|
264
|
-
* This will create a new feature object equivalent to {@link FeatureConstructor.
|
|
265
|
-
* `
|
|
266
|
-
* This is because both {@link FeatureConstructor.
|
|
267
|
-
* FeatureConstructor.
|
|
268
|
-
* `
|
|
264
|
+
* This will create a new feature object equivalent to {@link FeatureConstructor.ANY_WINDOW |
|
|
265
|
+
* `ANY_WINDOW`}.
|
|
266
|
+
* This is because both {@link FeatureConstructor.DOMWINDOW | `DOMWINDOW`} and {@link
|
|
267
|
+
* FeatureConstructor.WINDOW | `WINDOW`} imply {@link FeatureConstructor.ANY_WINDOW |
|
|
268
|
+
* `ANY_WINDOW`}.
|
|
269
269
|
*
|
|
270
270
|
* ```js
|
|
271
|
-
* const newFeature = JScrewIt.Feature.commonOf("
|
|
271
|
+
* const newFeature = JScrewIt.Feature.commonOf("DOMWINDOW", "WINDOW");
|
|
272
272
|
* ```
|
|
273
273
|
*/
|
|
274
274
|
commonOf(...features: FeatureElementOrCompatibleArray[]): CustomFeature | null;
|