jscrewit 2.37.0 → 2.39.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.
@@ -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
  *
@@ -138,6 +156,13 @@ export interface FeatureAll
138
156
  */
139
157
  CONSOLE: ElementaryFeature;
140
158
 
159
+ /**
160
+ * Existence of the function document.createElement.
161
+ *
162
+ * An alias for `ANY_DOCUMENT`.
163
+ */
164
+ CREATE_ELEMENT: ElementaryFeature;
165
+
141
166
  /** Minimum feature level, compatible with all supported engines in all environments. */
142
167
  DEFAULT: PredefinedFeature;
143
168
 
@@ -207,16 +232,29 @@ export interface FeatureAll
207
232
  /**
208
233
  * Features available in the current stable version of Firefox.
209
234
  *
210
- * An alias for `FF_90`.
235
+ * An alias for `FF_131`.
211
236
  */
212
237
  FF: PredefinedFeature;
213
238
 
214
239
  /**
215
- * Features available in Firefox 90 or later.
240
+ * Features available in Firefox 131 or later.
216
241
  *
217
242
  * @remarks
218
243
  *
219
- * This feature may be replaced or removed in the near future when current browser versions become obsolete. Use `FF`, `FF_ESR`, or `FF_PREV` instead of `FF_90` for long term support.
244
+ * 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.
245
+ *
246
+ * @see
247
+ *
248
+ * [Engine Support Policy](https://github.com/fasttime/JScrewIt#engine-support-policy)
249
+ */
250
+ FF_131: PredefinedFeature;
251
+
252
+ /**
253
+ * Features available in Firefox 90 to 130.
254
+ *
255
+ * @remarks
256
+ *
257
+ * 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
258
  *
221
259
  * @see
222
260
  *
@@ -267,6 +305,13 @@ export interface FeatureAll
267
305
  */
268
306
  FLAT: ElementaryFeature;
269
307
 
308
+ /**
309
+ * Existence of the object document.forms with string representation "\[object HTMLCollection\]".
310
+ *
311
+ * An alias for `ANY_DOCUMENT`.
312
+ */
313
+ FORMS: ElementaryFeature;
314
+
270
315
  /**
271
316
  * Existence of the function String.fromCodePoint.
272
317
  *
@@ -341,15 +386,6 @@ export interface FeatureAll
341
386
  */
342
387
  HTMLAUDIOELEMENT: ElementaryFeature;
343
388
 
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
389
  /** Features available in Internet Explorer 10. */
354
390
  IE_10: PredefinedFeature;
355
391
 
@@ -387,16 +423,34 @@ export interface FeatureAll
387
423
  *
388
424
  * @remarks
389
425
  *
390
- * Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10+, Opera, Android Browser 4.4, and Node.js 0.12+.
426
+ * Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 0.12+.
391
427
  */
392
428
  INTL: ElementaryFeature;
393
429
 
430
+ /**
431
+ * Availability of iterator helpers.
432
+ *
433
+ * @remarks
434
+ *
435
+ * Available in Chrome, Edge, Firefox 131+, Opera, and Node.js 22+.
436
+ */
437
+ ITERATOR_HELPER: ElementaryFeature;
438
+
439
+ /**
440
+ * Japanese string representation of Infinity ending with "∞".
441
+ *
442
+ * @remarks
443
+ *
444
+ * Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 0.12+.
445
+ */
446
+ JAPANESE_INFINITY: ElementaryFeature;
447
+
394
448
  /**
395
449
  * Language sensitive string representation of Infinity as "∞".
396
450
  *
397
451
  * @remarks
398
452
  *
399
- * Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10+, Opera, Android Browser 4.4, and Node.js 0.12+.
453
+ * 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
454
  */
401
455
  LOCALE_INFINITY: ElementaryFeature;
402
456
 
@@ -405,7 +459,7 @@ export interface FeatureAll
405
459
  *
406
460
  * @remarks
407
461
  *
408
- * Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10+, Opera, Android Browser 4.4, and Node.js 13+.
462
+ * Available in Chrome, Edge, Firefox, Internet Explorer 11, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 13+.
409
463
  */
410
464
  LOCALE_NUMERALS: ElementaryFeature;
411
465
 
@@ -416,7 +470,7 @@ export interface FeatureAll
416
470
  *
417
471
  * @remarks
418
472
  *
419
- * Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10+, Opera, Android Browser 4.4, and Node.js 13+.
473
+ * Available in Chrome, Edge, Firefox, Internet Explorer 11 on Windows 10, Safari 10.0+, Opera, Android Browser 4.4, and Node.js 13+.
420
474
  */
421
475
  LOCALE_NUMERALS_EXT: ElementaryFeature;
422
476
 
@@ -429,6 +483,15 @@ export interface FeatureAll
429
483
  */
430
484
  LOCATION: ElementaryFeature;
431
485
 
486
+ /**
487
+ * Existence of user agent string navigator.userAgent that starts with "Mozilla".
488
+ *
489
+ * @remarks
490
+ *
491
+ * Available in Chrome, Edge, Firefox, Internet Explorer, Safari, Opera, and Android Browser.
492
+ */
493
+ MOZILLA: ElementaryFeature;
494
+
432
495
  /**
433
496
  * Existence of the name property for functions.
434
497
  *
@@ -443,7 +506,7 @@ export interface FeatureAll
443
506
  *
444
507
  * @remarks
445
508
  *
446
- * Available in Safari before 10. This feature is not available inside web workers.
509
+ * Available in Safari before 10.0. This feature is not available inside web workers.
447
510
  */
448
511
  NODECONSTRUCTOR: ElementaryFeature;
449
512
 
@@ -480,9 +543,19 @@ export interface FeatureAll
480
543
  /** Features available in Node.js 4. */
481
544
  NODE_4: PredefinedFeature;
482
545
 
483
- /** Features available in Node.js 5 to 9. */
546
+ /** Features available in Node.js 5 to 7.5. */
484
547
  NODE_5: PredefinedFeature;
485
548
 
549
+ /** Features available in Node.js 7.6 to 9. */
550
+ NODE_7_6: PredefinedFeature;
551
+
552
+ /**
553
+ * Existence of the string document.nodeName that starts with a number sign \("#"\).
554
+ *
555
+ * An alias for `ANY_DOCUMENT`.
556
+ */
557
+ NODE_NAME: ElementaryFeature;
558
+
486
559
  /**
487
560
  * A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari.
488
561
  *
@@ -528,7 +601,7 @@ export interface FeatureAll
528
601
  *
529
602
  * @remarks
530
603
  *
531
- * Available in Firefox, Safari 9+, and Node.js 0.12+ before 22.
604
+ * Available in Firefox before 131, Safari 9+, and Node.js 0.12+ before 22.
532
605
  */
533
606
  OBJECT_ARRAY_ENTRIES_CTOR: ElementaryFeature;
534
607
 
@@ -537,7 +610,7 @@ export interface FeatureAll
537
610
  *
538
611
  * @remarks
539
612
  *
540
- * Available in Internet Explorer and Safari before 10. This feature is not available inside web workers.
613
+ * Available in Internet Explorer and Safari before 10.0. This feature is not available inside web workers.
541
614
  */
542
615
  OBJECT_L_LOCATION_CTOR: ElementaryFeature;
543
616
 
@@ -551,20 +624,20 @@ export interface FeatureAll
551
624
  OBJECT_UNDEFINED: ElementaryFeature;
552
625
 
553
626
  /**
554
- * The property that the string representation of the global object constructor starts with "\[object W".
627
+ * The property that the string representation of the global object self starts with "\[object W".
555
628
  *
556
629
  * @remarks
557
630
  *
558
- * Available in Internet Explorer and Safari before 10. This feature is not available inside web workers in Safari before 10.
631
+ * 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
632
  */
560
- OBJECT_W_CTOR: ElementaryFeature;
633
+ OBJECT_W_SELF: ElementaryFeature;
561
634
 
562
635
  /**
563
636
  * Existence of the global object location.constructor whose string representation starts with "\[object " and ends with "LocationConstructor\]".
564
637
  *
565
638
  * @remarks
566
639
  *
567
- * Available in Safari before 10.
640
+ * Available in Safari before 10.0.
568
641
  */
569
642
  OLD_SAFARI_LOCATION_CTOR: ElementaryFeature;
570
643
 
@@ -573,7 +646,7 @@ export interface FeatureAll
573
646
  *
574
647
  * @remarks
575
648
  *
576
- * Available in Internet Explorer 11, Safari 10+ before 14.0.1, Android Browser 4.4, and Node.js 0.12+ before 15.
649
+ * Available in Internet Explorer 11, Safari 10.0+ before 14.0.1, Android Browser 4.4, and Node.js 0.12+ before 15.
577
650
  */
578
651
  PLAIN_INTL: ElementaryFeature;
579
652
 
@@ -589,12 +662,15 @@ export interface FeatureAll
589
662
  /**
590
663
  * Features available in the current stable version of Safari.
591
664
  *
592
- * An alias for `SAFARI_17_4`.
665
+ * An alias for `SAFARI_18`.
593
666
  */
594
667
  SAFARI: PredefinedFeature;
595
668
 
596
- /** Features available in Safari 10 and Safari 11. */
597
- SAFARI_10: PredefinedFeature;
669
+ /** Features available in Safari 10.0. */
670
+ SAFARI_10_0: PredefinedFeature;
671
+
672
+ /** Features available in Safari 10.1 and Safari 11. */
673
+ SAFARI_10_1: PredefinedFeature;
598
674
 
599
675
  /** Features available in Safari 12. */
600
676
  SAFARI_12: PredefinedFeature;
@@ -611,9 +687,12 @@ export interface FeatureAll
611
687
  /** Features available in Safari 15.4 to 17.3. */
612
688
  SAFARI_15_4: PredefinedFeature;
613
689
 
614
- /** Features available in Safari 17.4 or later. */
690
+ /** Features available in Safari 17.4 to 17.6. */
615
691
  SAFARI_17_4: PredefinedFeature;
616
692
 
693
+ /** Features available in Safari 18 or later. */
694
+ SAFARI_18: PredefinedFeature;
695
+
617
696
  /** Features available in Safari 7.0. */
618
697
  SAFARI_7_0: PredefinedFeature;
619
698
 
@@ -631,7 +710,7 @@ export interface FeatureAll
631
710
  *
632
711
  * @remarks
633
712
  *
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.
713
+ * 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
714
  */
636
715
  SELF_OBJ: ElementaryFeature;
637
716
 
@@ -640,7 +719,7 @@ export interface FeatureAll
640
719
  *
641
720
  * @remarks
642
721
  *
643
- * Available in Firefox, Internet Explorer 11, Safari 10+, Android Browser 4.4, and Node.js 13+.
722
+ * Available in Firefox, Internet Explorer 11, Safari 10.0+ before 18, Android Browser 4.4, and Node.js 13+.
644
723
  */
645
724
  SHORT_LOCALES: ElementaryFeature;
646
725
 
@@ -691,9 +770,11 @@ type ElementaryFeatureName =
691
770
  | 'ANY_WINDOW'
692
771
  | 'ARRAY_ITERATOR'
693
772
  | 'ARROW'
773
+ | 'ASYNC_FUNCTION'
694
774
  | 'AT'
695
775
  | 'ATOB'
696
776
  | 'BARPROP'
777
+ | 'CALL_ON_GLOBAL'
697
778
  | 'CAPITAL_HTML'
698
779
  | 'CONSOLE'
699
780
  | 'DOCUMENT'
@@ -714,14 +795,16 @@ type ElementaryFeatureName =
714
795
  | 'GMT'
715
796
  | 'HISTORY'
716
797
  | 'HTMLAUDIOELEMENT'
717
- | 'HTMLDOCUMENT'
718
798
  | 'IE_SRC'
719
799
  | 'INCR_CHAR'
720
800
  | 'INTL'
801
+ | 'ITERATOR_HELPER'
802
+ | 'JAPANESE_INFINITY'
721
803
  | 'LOCALE_INFINITY'
722
804
  | 'LOCALE_NUMERALS'
723
805
  | 'LOCALE_NUMERALS_EXT'
724
806
  | 'LOCATION'
807
+ | 'MOZILLA'
725
808
  | 'NAME'
726
809
  | 'NODECONSTRUCTOR'
727
810
  | 'NO_FF_SRC'
@@ -731,7 +814,7 @@ type ElementaryFeatureName =
731
814
  | 'OBJECT_ARRAY_ENTRIES_CTOR'
732
815
  | 'OBJECT_L_LOCATION_CTOR'
733
816
  | 'OBJECT_UNDEFINED'
734
- | 'OBJECT_W_CTOR'
817
+ | 'OBJECT_W_SELF'
735
818
  | 'OLD_SAFARI_LOCATION_CTOR'
736
819
  | 'PLAIN_INTL'
737
820
  | 'REGEXP_STRING_ITERATOR'
@@ -754,6 +837,7 @@ ElementaryFeatureName
754
837
  | 'CHROME_122'
755
838
  | 'COMPACT'
756
839
  | 'DEFAULT'
840
+ | 'FF_131'
757
841
  | 'FF_90'
758
842
  | 'IE_10'
759
843
  | 'IE_11'
@@ -771,13 +855,16 @@ ElementaryFeatureName
771
855
  | 'NODE_22'
772
856
  | 'NODE_4'
773
857
  | 'NODE_5'
774
- | 'SAFARI_10'
858
+ | 'NODE_7_6'
859
+ | 'SAFARI_10_0'
860
+ | 'SAFARI_10_1'
775
861
  | 'SAFARI_12'
776
862
  | 'SAFARI_13'
777
863
  | 'SAFARI_14_0_1'
778
864
  | 'SAFARI_14_1'
779
865
  | 'SAFARI_15_4'
780
866
  | 'SAFARI_17_4'
867
+ | 'SAFARI_18'
781
868
  | 'SAFARI_7_0'
782
869
  | 'SAFARI_7_1'
783
870
  | '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.ANY_DOCUMENT |
265
- * `ANY_DOCUMENT`}.
266
- * This is because both {@link FeatureConstructor.HTMLDOCUMENT | `HTMLDOCUMENT`} and {@link
267
- * FeatureConstructor.DOCUMENT | `DOCUMENT`} imply {@link FeatureConstructor.ANY_DOCUMENT |
268
- * `ANY_DOCUMENT`}.
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("HTMLDOCUMENT", "DOCUMENT");
271
+ * const newFeature = JScrewIt.Feature.commonOf("DOMWINDOW", "WINDOW");
272
272
  * ```
273
273
  */
274
274
  commonOf(...features: FeatureElementOrCompatibleArray[]): CustomFeature | null;