@github/browser-support 1.0.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.
Files changed (150) hide show
  1. package/README.md +51 -0
  2. package/lib/abortsignal-abort.d.ts +10 -0
  3. package/lib/abortsignal-abort.d.ts.map +1 -0
  4. package/lib/abortsignal-abort.js +23 -0
  5. package/lib/abortsignal-abort.js.map +1 -0
  6. package/lib/abortsignal-timeout.d.ts +10 -0
  7. package/lib/abortsignal-timeout.d.ts.map +1 -0
  8. package/lib/abortsignal-timeout.js +23 -0
  9. package/lib/abortsignal-timeout.js.map +1 -0
  10. package/lib/aggregateerror.d.ts +11 -0
  11. package/lib/aggregateerror.d.ts.map +1 -0
  12. package/lib/aggregateerror.js +33 -0
  13. package/lib/aggregateerror.js.map +1 -0
  14. package/lib/arraylike-at.d.ts +5 -0
  15. package/lib/arraylike-at.d.ts.map +1 -0
  16. package/lib/arraylike-at.js +30 -0
  17. package/lib/arraylike-at.js.map +1 -0
  18. package/lib/capable-browser.d.ts +2 -0
  19. package/lib/capable-browser.d.ts.map +1 -0
  20. package/lib/capable-browser.js +23 -0
  21. package/lib/capable-browser.js.map +1 -0
  22. package/lib/capable-without-polyfills.d.ts +2 -0
  23. package/lib/capable-without-polyfills.d.ts.map +1 -0
  24. package/lib/capable-without-polyfills.js +2 -0
  25. package/lib/capable-without-polyfills.js.map +1 -0
  26. package/lib/checks/is-abortcontroller-supported.d.ts +2 -0
  27. package/lib/checks/is-abortcontroller-supported.d.ts.map +1 -0
  28. package/lib/checks/is-abortcontroller-supported.js +4 -0
  29. package/lib/checks/is-abortcontroller-supported.js.map +1 -0
  30. package/lib/checks/is-abortsignal-abort-supported.d.ts +3 -0
  31. package/lib/checks/is-abortsignal-abort-supported.d.ts.map +1 -0
  32. package/lib/checks/is-abortsignal-abort-supported.js +8 -0
  33. package/lib/checks/is-abortsignal-abort-supported.js.map +1 -0
  34. package/lib/checks/is-abortsignal-timeout-supported.d.ts +3 -0
  35. package/lib/checks/is-abortsignal-timeout-supported.d.ts.map +1 -0
  36. package/lib/checks/is-abortsignal-timeout-supported.js +8 -0
  37. package/lib/checks/is-abortsignal-timeout-supported.js.map +1 -0
  38. package/lib/checks/is-crypto-randomuuid-supported.d.ts +3 -0
  39. package/lib/checks/is-crypto-randomuuid-supported.d.ts.map +1 -0
  40. package/lib/checks/is-crypto-randomuuid-supported.js +8 -0
  41. package/lib/checks/is-crypto-randomuuid-supported.js.map +1 -0
  42. package/lib/checks/is-event-abortsignal-supported.d.ts +3 -0
  43. package/lib/checks/is-event-abortsignal-supported.d.ts.map +1 -0
  44. package/lib/checks/is-event-abortsignal-supported.js +29 -0
  45. package/lib/checks/is-event-abortsignal-supported.js.map +1 -0
  46. package/lib/checks/is-hasown-supported.d.ts +3 -0
  47. package/lib/checks/is-hasown-supported.d.ts.map +1 -0
  48. package/lib/checks/is-hasown-supported.js +8 -0
  49. package/lib/checks/is-hasown-supported.js.map +1 -0
  50. package/lib/checks/is-native-function.d.ts +2 -0
  51. package/lib/checks/is-native-function.d.ts.map +1 -0
  52. package/lib/checks/is-native-function.js +7 -0
  53. package/lib/checks/is-native-function.js.map +1 -0
  54. package/lib/checks/is-object-hasown-supported.d.ts +3 -0
  55. package/lib/checks/is-object-hasown-supported.d.ts.map +1 -0
  56. package/lib/checks/is-object-hasown-supported.js +8 -0
  57. package/lib/checks/is-object-hasown-supported.js.map +1 -0
  58. package/lib/checks/is-requestidlecallback-supported.d.ts +3 -0
  59. package/lib/checks/is-requestidlecallback-supported.d.ts.map +1 -0
  60. package/lib/checks/is-requestidlecallback-supported.js +8 -0
  61. package/lib/checks/is-requestidlecallback-supported.js.map +1 -0
  62. package/lib/checks/is-supported-without-polyfills.d.ts +2 -0
  63. package/lib/checks/is-supported-without-polyfills.d.ts.map +1 -0
  64. package/lib/checks/is-supported-without-polyfills.js +14 -0
  65. package/lib/checks/is-supported-without-polyfills.js.map +1 -0
  66. package/lib/checks/is-supported.d.ts +3 -0
  67. package/lib/checks/is-supported.d.ts.map +1 -0
  68. package/lib/checks/is-supported.js +38 -0
  69. package/lib/checks/is-supported.js.map +1 -0
  70. package/lib/crypto-randomuuid.d.ts +10 -0
  71. package/lib/crypto-randomuuid.d.ts.map +1 -0
  72. package/lib/crypto-randomuuid.js +25 -0
  73. package/lib/crypto-randomuuid.js.map +1 -0
  74. package/lib/event-abortsignal.d.ts +10 -0
  75. package/lib/event-abortsignal.d.ts.map +1 -0
  76. package/lib/event-abortsignal.js +37 -0
  77. package/lib/event-abortsignal.js.map +1 -0
  78. package/lib/index.d.ts +4 -0
  79. package/lib/index.d.ts.map +1 -0
  80. package/lib/index.js +75 -0
  81. package/lib/index.js.map +1 -0
  82. package/lib/object-hasown.d.ts +10 -0
  83. package/lib/object-hasown.d.ts.map +1 -0
  84. package/lib/object-hasown.js +25 -0
  85. package/lib/object-hasown.js.map +1 -0
  86. package/lib/polyfills/abortsignal-abort.d.ts +7 -0
  87. package/lib/polyfills/abortsignal-abort.d.ts.map +1 -0
  88. package/lib/polyfills/abortsignal-abort.js +6 -0
  89. package/lib/polyfills/abortsignal-abort.js.map +1 -0
  90. package/lib/polyfills/abortsignal-timeout.d.ts +7 -0
  91. package/lib/polyfills/abortsignal-timeout.d.ts.map +1 -0
  92. package/lib/polyfills/abortsignal-timeout.js +6 -0
  93. package/lib/polyfills/abortsignal-timeout.js.map +1 -0
  94. package/lib/polyfills/crypto-uuid.d.ts +7 -0
  95. package/lib/polyfills/crypto-uuid.d.ts.map +1 -0
  96. package/lib/polyfills/crypto-uuid.js +13 -0
  97. package/lib/polyfills/crypto-uuid.js.map +1 -0
  98. package/lib/polyfills/event-abortsignal.d.ts +12 -0
  99. package/lib/polyfills/event-abortsignal.d.ts.map +1 -0
  100. package/lib/polyfills/event-abortsignal.js +11 -0
  101. package/lib/polyfills/event-abortsignal.js.map +1 -0
  102. package/lib/polyfills/object-hasown.d.ts +7 -0
  103. package/lib/polyfills/object-hasown.d.ts.map +1 -0
  104. package/lib/polyfills/object-hasown.js +8 -0
  105. package/lib/polyfills/object-hasown.js.map +1 -0
  106. package/lib/polyfills/requestidlecallback.d.ts +3 -0
  107. package/lib/polyfills/requestidlecallback.d.ts.map +1 -0
  108. package/lib/polyfills/requestidlecallback.js +32 -0
  109. package/lib/polyfills/requestidlecallback.js.map +1 -0
  110. package/lib/promise-any.d.ts +12 -0
  111. package/lib/promise-any.d.ts.map +1 -0
  112. package/lib/promise-any.js +37 -0
  113. package/lib/promise-any.js.map +1 -0
  114. package/lib/register-polyfills/abortsignal-abort.d.ts +2 -0
  115. package/lib/register-polyfills/abortsignal-abort.d.ts.map +1 -0
  116. package/lib/register-polyfills/abortsignal-abort.js +6 -0
  117. package/lib/register-polyfills/abortsignal-abort.js.map +1 -0
  118. package/lib/register-polyfills/abortsignal-timeout.d.ts +2 -0
  119. package/lib/register-polyfills/abortsignal-timeout.d.ts.map +1 -0
  120. package/lib/register-polyfills/abortsignal-timeout.js +6 -0
  121. package/lib/register-polyfills/abortsignal-timeout.js.map +1 -0
  122. package/lib/register-polyfills/crypto-uuid.d.ts +2 -0
  123. package/lib/register-polyfills/crypto-uuid.d.ts.map +1 -0
  124. package/lib/register-polyfills/crypto-uuid.js +6 -0
  125. package/lib/register-polyfills/crypto-uuid.js.map +1 -0
  126. package/lib/register-polyfills/event-abortsignal.d.ts +2 -0
  127. package/lib/register-polyfills/event-abortsignal.d.ts.map +1 -0
  128. package/lib/register-polyfills/event-abortsignal.js +7 -0
  129. package/lib/register-polyfills/event-abortsignal.js.map +1 -0
  130. package/lib/register-polyfills/index.d.ts +7 -0
  131. package/lib/register-polyfills/index.d.ts.map +1 -0
  132. package/lib/register-polyfills/index.js +7 -0
  133. package/lib/register-polyfills/index.js.map +1 -0
  134. package/lib/register-polyfills/object-hasown.d.ts +2 -0
  135. package/lib/register-polyfills/object-hasown.d.ts.map +1 -0
  136. package/lib/register-polyfills/object-hasown.js +10 -0
  137. package/lib/register-polyfills/object-hasown.js.map +1 -0
  138. package/lib/register-polyfills/requestidlecallback.d.ts +2 -0
  139. package/lib/register-polyfills/requestidlecallback.d.ts.map +1 -0
  140. package/lib/register-polyfills/requestidlecallback.js +6 -0
  141. package/lib/register-polyfills/requestidlecallback.js.map +1 -0
  142. package/lib/register.d.ts +2 -0
  143. package/lib/register.d.ts.map +1 -0
  144. package/lib/register.js +2 -0
  145. package/lib/register.js.map +1 -0
  146. package/lib/requestidlecallback.d.ts +6 -0
  147. package/lib/requestidlecallback.d.ts.map +1 -0
  148. package/lib/requestidlecallback.js +41 -0
  149. package/lib/requestidlecallback.js.map +1 -0
  150. package/package.json +51 -0
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # browser-support
2
+
3
+ Polyfills for small new features, plus functions to determine browser feature support.
4
+
5
+ ### How is this used on GitHub?
6
+
7
+ We use all of these polyfills on GitHub.com. We also use the `isSupported()` function to determine if the browser is well supported, unsupported browsers do not send errors or statistics to our backend monitoring.
8
+
9
+ ## Installation
10
+
11
+ ```
12
+ $ npm install @github/browser-support
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### JS
18
+
19
+ ```js
20
+ import {isSupported, isPolyfilled, apply} from '@github/browser-support'
21
+
22
+ // Check if a browser is supported
23
+ if (!isSupported()) {
24
+ apply()
25
+ console.assert(isSupported() === true)
26
+ console.assert(isPolyfilled() === true)
27
+ }
28
+ ```
29
+
30
+ ## Development
31
+
32
+ ```
33
+ npm install
34
+ npm test
35
+ ```
36
+
37
+ ## Contributing
38
+
39
+ ### Adding polyfills
40
+
41
+ Please do not add any polyfills for ECMA features that are Stage 3 or below. We _only_ wish to polyfill features from ECMAScript that are Stage 4 (about to be included in a new years specification) or already specified.
42
+
43
+ ### Removing polyfills
44
+
45
+ When our supported browsers (see github/github for details) all support a feature without polyfills, we can remove the polyfill. This code is designed to be kept lightweight, we do not want to ship dozens of kb of polyfills.
46
+
47
+ As a polyfill is removed, it may be worth adding feature detection to the `baseSupport` const, to ensure that our baseline moves with our browser support matrix.
48
+
49
+ ## License
50
+
51
+ Distributed under the MIT license. See LICENSE for details.
@@ -0,0 +1,10 @@
1
+ export declare function abortSignalAbort(reason: unknown): AbortSignal;
2
+ declare global {
3
+ interface AbortController {
4
+ abort(reason: unknown): void;
5
+ }
6
+ }
7
+ export declare function isSupported(): boolean;
8
+ export declare function isPolyfilled(): boolean;
9
+ export declare function apply(): void;
10
+ //# sourceMappingURL=abortsignal-abort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortsignal-abort.d.ts","sourceRoot":"","sources":["../src/abortsignal-abort.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,eAI/C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAe;QACvB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;KAC7B;CACF;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAMrC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAGtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAK5B"}
@@ -0,0 +1,23 @@
1
+ export function abortSignalAbort(reason) {
2
+ const controller = new AbortController();
3
+ controller.abort(reason);
4
+ return controller.signal;
5
+ }
6
+ /*#__PURE__*/
7
+ export function isSupported() {
8
+ return ('abort' in AbortSignal &&
9
+ // @ts-expect-error `.abort`
10
+ typeof AbortSignal.abort === 'function');
11
+ }
12
+ /*#__PURE__*/
13
+ export function isPolyfilled() {
14
+ // @ts-expect-error `.abort`
15
+ return AbortSignal.abort === abortSignalAbort;
16
+ }
17
+ export function apply() {
18
+ if (!isSupported()) {
19
+ // @ts-expect-error `.abort`
20
+ AbortSignal.abort = abortSignalAbort;
21
+ }
22
+ }
23
+ //# sourceMappingURL=abortsignal-abort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortsignal-abort.js","sourceRoot":"","sources":["../src/abortsignal-abort.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,MAAe;IAC9C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACxB,OAAO,UAAU,CAAC,MAAM,CAAA;AAC1B,CAAC;AAQD,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,OAAO,IAAI,WAAW;QACtB,4BAA4B;QAC5B,OAAO,WAAW,CAAC,KAAK,KAAK,UAAU,CACxC,CAAA;AACH,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,4BAA4B;IAC5B,OAAO,WAAW,CAAC,KAAK,KAAK,gBAAgB,CAAA;AAC/C,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,4BAA4B;QAC5B,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAA;KACrC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare function abortSignalTimeout(ms: number): AbortSignal;
2
+ declare global {
3
+ interface AbortController {
4
+ abort(reason: unknown): void;
5
+ }
6
+ }
7
+ export declare function isSupported(): boolean;
8
+ export declare function isPolyfilled(): boolean;
9
+ export declare function apply(): void;
10
+ //# sourceMappingURL=abortsignal-timeout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortsignal-timeout.d.ts","sourceRoot":"","sources":["../src/abortsignal-timeout.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,eAI5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAe;QACvB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;KAC7B;CACF;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAMrC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAGtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAK5B"}
@@ -0,0 +1,23 @@
1
+ export function abortSignalTimeout(ms) {
2
+ const controller = new AbortController();
3
+ setTimeout(() => controller.abort(new DOMException('TimeoutError')), ms);
4
+ return controller.signal;
5
+ }
6
+ /*#__PURE__*/
7
+ export function isSupported() {
8
+ return ('abort' in AbortSignal &&
9
+ // @ts-expect-error `.timeout`
10
+ typeof AbortSignal.timeout === 'function');
11
+ }
12
+ /*#__PURE__*/
13
+ export function isPolyfilled() {
14
+ // @ts-expect-error `.timeout`
15
+ return AbortSignal.timeout === abortSignalTimeout;
16
+ }
17
+ export function apply() {
18
+ if (!isSupported()) {
19
+ // @ts-expect-error `.timeout`
20
+ AbortSignal.timeout = abortSignalTimeout;
21
+ }
22
+ }
23
+ //# sourceMappingURL=abortsignal-timeout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortsignal-timeout.js","sourceRoot":"","sources":["../src/abortsignal-timeout.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,cAAc,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACxE,OAAO,UAAU,CAAC,MAAM,CAAA;AAC1B,CAAC;AAQD,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,OAAO,IAAI,WAAW;QACtB,8BAA8B;QAC9B,OAAO,WAAW,CAAC,OAAO,KAAK,UAAU,CAC1C,CAAA;AACH,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,8BAA8B;IAC9B,OAAO,WAAW,CAAC,OAAO,KAAK,kBAAkB,CAAA;AACnD,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,8BAA8B;QAC9B,WAAW,CAAC,OAAO,GAAG,kBAAkB,CAAA;KACzC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare class AggregateError extends Error {
2
+ errors: unknown[];
3
+ cause: unknown;
4
+ constructor(errors: unknown[], message: string, options?: {
5
+ cause?: unknown;
6
+ });
7
+ }
8
+ export declare function isSupported(): boolean;
9
+ export declare function isPolyfilled(): boolean;
10
+ export declare function apply(): void;
11
+ //# sourceMappingURL=aggregateerror.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregateerror.d.ts","sourceRoot":"","sources":["../src/aggregateerror.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAe,SAAQ,KAAK;IAC/B,MAAM,EAAE,OAAO,EAAE,CAAA;IACjB,KAAK,EAAE,OAAO,CAAA;gBAEV,MAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAM;CAehF;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAGtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAK5B"}
@@ -0,0 +1,33 @@
1
+ export class AggregateError extends Error {
2
+ constructor(errors, message, options = {}) {
3
+ super(message);
4
+ Object.defineProperty(this, 'errors', {
5
+ value: Array.from(errors),
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ if (options.cause) {
10
+ Object.defineProperty(this, 'cause', {
11
+ value: options.cause,
12
+ configurable: true,
13
+ writable: true
14
+ });
15
+ }
16
+ }
17
+ }
18
+ /*#__PURE__*/
19
+ export function isSupported() {
20
+ return typeof AggregateError === 'function';
21
+ }
22
+ /*#__PURE__*/
23
+ export function isPolyfilled() {
24
+ // @ts-expect-error `AggregateError`
25
+ return globalThis.AggregateError === AggregateError;
26
+ }
27
+ export function apply() {
28
+ if (!isSupported()) {
29
+ // @ts-expect-error `AggregateError`
30
+ globalThis.AggregateError = AggregateError;
31
+ }
32
+ }
33
+ //# sourceMappingURL=aggregateerror.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregateerror.js","sourceRoot":"","sources":["../src/aggregateerror.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAe,SAAQ,KAAK;IAIvC,YAAY,MAAiB,EAAE,OAAe,EAAE,UAA6B,EAAE;QAC7E,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE;YACpC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;YACzB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAA;QACF,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE;gBACnC,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,IAAI;aACf,CAAC,CAAA;SACH;IACH,CAAC;CACF;AAED,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,cAAc,KAAK,UAAU,CAAA;AAC7C,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,oCAAoC;IACpC,OAAO,UAAU,CAAC,cAAc,KAAK,cAAc,CAAA;AACrD,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,oCAAoC;QACpC,UAAU,CAAC,cAAc,GAAG,cAAc,CAAA;KAC3C;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function arrayLikeAt<T>(this: ArrayLike<T>, i: number): T | void;
2
+ export declare function isSupported(): boolean;
3
+ export declare function isPolyfilled(): boolean;
4
+ export declare function apply(): void;
5
+ //# sourceMappingURL=arraylike-at.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arraylike-at.d.ts","sourceRoot":"","sources":["../src/arraylike-at.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAKtE;AAGD,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAO5B"}
@@ -0,0 +1,30 @@
1
+ const TypedArrayProto = Reflect.getPrototypeOf(Int8Array) || {};
2
+ export function arrayLikeAt(i) {
3
+ const l = this.length;
4
+ i = Math.trunc(i) || 0;
5
+ if (i < 0)
6
+ i += l;
7
+ return i < 0 || i >= l ? undefined : this[i];
8
+ }
9
+ /*#__PURE__*/
10
+ export function isSupported() {
11
+ return ('at' in Array.prototype &&
12
+ typeof Array.prototype.at === 'function' &&
13
+ 'at' in String.prototype &&
14
+ typeof String.prototype.at === 'function' &&
15
+ 'at' in TypedArrayProto &&
16
+ typeof TypedArrayProto.at === 'function');
17
+ }
18
+ /*#__PURE__*/
19
+ export function isPolyfilled() {
20
+ return Array.prototype.at === arrayLikeAt && String.prototype.at === arrayLikeAt && TypedArrayProto.at === arrayLikeAt;
21
+ }
22
+ export function apply() {
23
+ if (!isSupported()) {
24
+ const defn = { value: arrayLikeAt, writable: true, configurable: true };
25
+ Object.defineProperty(Array.prototype, 'at', defn);
26
+ Object.defineProperty(String.prototype, 'at', defn);
27
+ Object.defineProperty(TypedArrayProto, 'at', defn);
28
+ }
29
+ }
30
+ //# sourceMappingURL=arraylike-at.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arraylike-at.js","sourceRoot":"","sources":["../src/arraylike-at.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAA8B,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;AAE1F,MAAM,UAAU,WAAW,CAAwB,CAAS;IAC1D,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAA;IACrB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,CAAC,GAAG,CAAC;QAAE,CAAC,IAAI,CAAC,CAAA;IACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAC9C,CAAC;AAED,aAAa;AACb,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,IAAI,IAAI,KAAK,CAAC,SAAS;QACvB,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,UAAU;QACxC,IAAI,IAAI,MAAM,CAAC,SAAS;QACxB,OAAO,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,UAAU;QACzC,IAAI,IAAI,eAAe;QACvB,OAAO,eAAe,CAAC,EAAE,KAAK,UAAU,CACzC,CAAA;AACH,CAAC;AAED,aAAa;AACb,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,WAAW,IAAI,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,WAAW,IAAI,eAAe,CAAC,EAAE,KAAK,WAAW,CAAA;AACxH,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,IAAI,CAAC,WAAW,EAAE,EAAE;QAClB,MAAM,IAAI,GAAG,EAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAC,CAAA;QACrE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAClD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACnD,MAAM,CAAC,cAAc,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;KACnD;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function capableBrowser(): boolean
2
+ //# sourceMappingURL=capable-browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capable-browser.d.ts","sourceRoot":"","sources":["../src/capable-browser.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,YAqB7B"}
@@ -0,0 +1,23 @@
1
+ export function capableBrowser() {
2
+ return (
3
+ typeof Blob === 'function' &&
4
+ typeof PerformanceObserver === 'function' &&
5
+ typeof Intl !== 'undefined' &&
6
+ typeof MutationObserver !== 'undefined' &&
7
+ typeof URLSearchParams !== 'undefined' &&
8
+ typeof WebSocket !== 'undefined' &&
9
+ typeof IntersectionObserver !== 'undefined' &&
10
+ typeof AbortController !== 'undefined' &&
11
+ typeof queueMicrotask !== 'undefined' &&
12
+ typeof TextEncoder !== 'undefined' &&
13
+ typeof TextDecoder !== 'undefined' &&
14
+ typeof customElements !== 'undefined' &&
15
+ typeof HTMLDetailsElement !== 'undefined' &&
16
+ 'fromEntries' in Object &&
17
+ 'entries' in FormData.prototype &&
18
+ 'toggleAttribute' in Element.prototype &&
19
+ 'flatMap' in Array.prototype &&
20
+ 'replaceChildren' in Element.prototype
21
+ )
22
+ }
23
+ //# sourceMappingURL=capable-browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capable-browser.js","sourceRoot":"","sources":["../src/capable-browser.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc;IAC9B,OAAO,CACH,OAAO,IAAI,KAAK,UAAU;QAC1B,OAAO,mBAAmB,KAAK,UAAU;QACzC,OAAO,IAAI,KAAK,WAAW;QAC3B,OAAO,gBAAgB,KAAK,WAAW;QACvC,OAAO,eAAe,KAAK,WAAW;QACtC,OAAO,SAAS,KAAK,WAAW;QAChC,OAAO,oBAAoB,KAAK,WAAW;QAC3C,OAAO,eAAe,KAAK,WAAW;QACtC,OAAO,cAAc,KAAK,WAAW;QACrC,OAAO,WAAW,KAAK,WAAW;QAClC,OAAO,WAAW,KAAK,WAAW;QAClC,OAAO,cAAc,KAAK,WAAW;QACrC,OAAO,kBAAkB,KAAK,WAAW;QACzC,aAAa,IAAI,MAAM;QACvB,SAAS,IAAI,QAAQ,CAAC,SAAS;QAC/B,iBAAiB,IAAI,OAAO,CAAC,SAAS;QACtC,SAAS,IAAI,KAAK,CAAC,SAAS;QAC5B,iBAAiB,IAAI,OAAO,CAAC,SAAS,CACvC,CAAA;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function capableBrowserWithoutPolyfills(): void
2
+ //# sourceMappingURL=capable-without-polyfills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capable-without-polyfills.d.ts","sourceRoot":"","sources":["../src/capable-without-polyfills.ts"],"names":[],"mappings":"AAEA,wBAAgB,8BAA8B,SAG7C"}
@@ -0,0 +1,2 @@
1
+ export function capableBrowserWithoutPolyfills() {}
2
+ //# sourceMappingURL=capable-without-polyfills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capable-without-polyfills.js","sourceRoot":"","sources":["../src/capable-without-polyfills.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,8BAA8B;AAG9C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function isAbortControllerSupported(): boolean
2
+ //# sourceMappingURL=is-abortcontroller-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-abortcontroller-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-abortcontroller-supported.ts"],"names":[],"mappings":"AAAA,wBAAgB,0BAA0B,YAGzC"}
@@ -0,0 +1,4 @@
1
+ export function isAbortControllerSupported() {
2
+ return typeof AbortController === 'function' && typeof AbortSignal === 'function'
3
+ }
4
+ //# sourceMappingURL=is-abortcontroller-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-abortcontroller-supported.js","sourceRoot":"","sources":["../../src/checks/is-abortcontroller-supported.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,0BAA0B;IACxC,OAAO,OAAO,eAAe,KAAK,UAAU;QAC1C,OAAO,WAAW,KAAK,UAAU,CAAA;AACrC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isAbortSignalAbortSupported(): boolean
2
+ export declare function isObjectHasOwnSupportedWithoutPolyfills(): boolean
3
+ //# sourceMappingURL=is-abortsignal-abort-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-abortsignal-abort-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-abortsignal-abort-supported.ts"],"names":[],"mappings":"AAEA,wBAAgB,2BAA2B,IAAI,OAAO,CAErD;AAED,wBAAgB,uCAAuC,IAAI,OAAO,CAEjE"}
@@ -0,0 +1,8 @@
1
+ import {isNativeFunction} from './is-native-function'
2
+ export function isAbortSignalAbortSupported() {
3
+ return 'abort' in AbortSignal && typeof AbortSignal.abort === 'function'
4
+ }
5
+ export function isObjectHasOwnSupportedWithoutPolyfills() {
6
+ return isAbortSignalAbortSupported() && isNativeFunction(AbortSignal.abort)
7
+ }
8
+ //# sourceMappingURL=is-abortsignal-abort-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-abortsignal-abort-supported.js","sourceRoot":"","sources":["../../src/checks/is-abortsignal-abort-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,2BAA2B;IACzC,OAAO,OAAO,IAAI,WAAW,IAAI,OAAO,WAAW,CAAC,KAAK,KAAK,UAAU,CAAA;AAC1E,CAAC;AAED,MAAM,UAAU,uCAAuC;IACrD,OAAO,2BAA2B,EAAE,IAAI,gBAAgB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;AAC7E,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isAbortSignalTimeoutSupported(): boolean
2
+ export declare function isObjectHasOwnSupportedWithoutPolyfills(): boolean
3
+ //# sourceMappingURL=is-abortsignal-timeout-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-abortsignal-timeout-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-abortsignal-timeout-supported.ts"],"names":[],"mappings":"AAEA,wBAAgB,6BAA6B,IAAI,OAAO,CAEvD;AAED,wBAAgB,uCAAuC,IAAI,OAAO,CAEjE"}
@@ -0,0 +1,8 @@
1
+ import {isNativeFunction} from './is-native-function'
2
+ export function isAbortSignalTimeoutSupported() {
3
+ return 'timeout' in AbortSignal && typeof AbortSignal.timeout === 'function'
4
+ }
5
+ export function isObjectHasOwnSupportedWithoutPolyfills() {
6
+ return isAbortSignalTimeoutSupported() && isNativeFunction(AbortSignal.timeout)
7
+ }
8
+ //# sourceMappingURL=is-abortsignal-timeout-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-abortsignal-timeout-supported.js","sourceRoot":"","sources":["../../src/checks/is-abortsignal-timeout-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,6BAA6B;IAC3C,OAAO,SAAS,IAAI,WAAW,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,UAAU,CAAA;AAC9E,CAAC;AAED,MAAM,UAAU,uCAAuC;IACrD,OAAO,6BAA6B,EAAE,IAAI,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AACjF,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isCryptoRandomUUIDSupported(): boolean
2
+ export declare function isCryptoRandomUUIDSupportedWithoutPolyfills(): boolean
3
+ //# sourceMappingURL=is-crypto-randomuuid-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-crypto-randomuuid-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-crypto-randomuuid-supported.ts"],"names":[],"mappings":"AAEA,wBAAgB,2BAA2B,IAAI,OAAO,CAIrD;AAED,wBAAgB,2CAA2C,IAAI,OAAO,CAErE"}
@@ -0,0 +1,8 @@
1
+ import {isNativeFunction} from './is-native-function'
2
+ export function isCryptoRandomUUIDSupported() {
3
+ return typeof crypto === 'object' && 'randomUUID' in crypto && typeof crypto.randomUUID === 'function'
4
+ }
5
+ export function isCryptoRandomUUIDSupportedWithoutPolyfills() {
6
+ return isCryptoRandomUUIDSupported() && isNativeFunction(crypto.randomUUID)
7
+ }
8
+ //# sourceMappingURL=is-crypto-randomuuid-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-crypto-randomuuid-supported.js","sourceRoot":"","sources":["../../src/checks/is-crypto-randomuuid-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,2BAA2B;IACzC,OAAO,OAAO,MAAM,KAAK,QAAQ;QAC/B,YAAY,IAAI,MAAM;QACtB,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,2CAA2C;IACzD,OAAO,2BAA2B,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AAC7E,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isEventAbortSignalSupported(): boolean
2
+ export declare function isEventAbortSignalSupportedWithoutPolyfils(): boolean
3
+ //# sourceMappingURL=is-event-abortsignal-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-event-abortsignal-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-event-abortsignal-supported.ts"],"names":[],"mappings":"AAGA,wBAAgB,2BAA2B,IAAI,OAAO,CAsBrD;AAED,wBAAgB,0CAA0C,IAAI,OAAO,CAEpE"}
@@ -0,0 +1,29 @@
1
+ import {isNativeFunction} from './is-native-function'
2
+ let cached = null
3
+ export function isEventAbortSignalSupported() {
4
+ if (cached !== null) return cached
5
+ let signalSupported = false
6
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
7
+ function noop() {}
8
+ try {
9
+ const options = Object.create(
10
+ {},
11
+ {
12
+ signal: {
13
+ get() {
14
+ signalSupported = true
15
+ }
16
+ }
17
+ }
18
+ )
19
+ window.addEventListener('test', noop, options)
20
+ window.removeEventListener('test', noop, options)
21
+ return (cached = signalSupported)
22
+ } catch (e) {
23
+ return (cached = signalSupported)
24
+ }
25
+ }
26
+ export function isEventAbortSignalSupportedWithoutPolyfils() {
27
+ return isEventAbortSignalSupported() && isNativeFunction(EventTarget.prototype.addEventListener)
28
+ }
29
+ //# sourceMappingURL=is-event-abortsignal-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-event-abortsignal-supported.js","sourceRoot":"","sources":["../../src/checks/is-event-abortsignal-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,IAAI,MAAM,GAAiB,IAAI,CAAA;AAC/B,MAAM,UAAU,2BAA2B;IACzC,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,MAAM,CAAA;IAClC,IAAI,eAAe,GAAG,KAAK,CAAA;IAC3B,gEAAgE;IAChE,SAAS,IAAI,KAAI,CAAC;IAClB,IAAI;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAC3B,EAAE,EACF;YACE,MAAM,EAAE;gBACN,GAAG;oBACD,eAAe,GAAG,IAAI,CAAA;gBACxB,CAAC;aACF;SACF,CACF,CAAA;QACD,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QAC9C,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACjD,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,CAAA;KAClC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC,CAAA;KAClC;AACH,CAAC;AAED,MAAM,UAAU,0CAA0C;IACxD,OAAO,2BAA2B,EAAE,IAAI,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAClG,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isHasOwnSupported(): boolean
2
+ export declare function isHasOwnSupportedWithoutPolyfills(): void
3
+ //# sourceMappingURL=is-hasown-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-hasown-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-hasown-supported.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,YAEhC;AAED,wBAAgB,iCAAiC,SAEhD"}
@@ -0,0 +1,8 @@
1
+ import {isNativeFunction} from './is-native-function'
2
+ export function isHasOwnSupported() {
3
+ return 'hasOwn' in Object && typeof Object.hasOwn === 'function'
4
+ }
5
+ export function isHasOwnSupportedWithoutPolyfills() {
6
+ 'hasOwn' in Object && isNativeFunction(Object.hasOwn)
7
+ }
8
+ //# sourceMappingURL=is-hasown-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-hasown-supported.js","sourceRoot":"","sources":["../../src/checks/is-hasown-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,iBAAiB;IAC/B,OAAO,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,CAAA;AAClE,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,QAAQ,IAAI,MAAM,IAAI,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACvD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function isNativeFunction(fn: (...args: unknown[]) => unknown): boolean
2
+ //# sourceMappingURL=is-native-function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-native-function.d.ts","sourceRoot":"","sources":["../../src/checks/is-native-function.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,OAAO,CAG7E"}
@@ -0,0 +1,7 @@
1
+ const nativeRe = /\{\s*\[native code\]\s*\}/
2
+ const fnString = Function.prototype.toString
3
+ export function isNativeFunction(fn) {
4
+ if (typeof fn !== 'function') return false
5
+ return nativeRe.test(fnString.call(fn))
6
+ }
7
+ //# sourceMappingURL=is-native-function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-native-function.js","sourceRoot":"","sources":["../../src/checks/is-native-function.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,2BAA2B,CAAA;AAC5C,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAA;AAC5C,MAAM,UAAU,gBAAgB,CAAC,EAAmC;IAClE,IAAI,OAAO,EAAE,KAAK,UAAU;QAAE,OAAO,KAAK,CAAA;IAC1C,OAAO,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;AACzC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isObjectHasOwnSupported(): boolean
2
+ export declare function isObjectHasOwnSupportedWithoutPolyfills(): boolean
3
+ //# sourceMappingURL=is-object-hasown-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-object-hasown-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-object-hasown-supported.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED,wBAAgB,uCAAuC,IAAI,OAAO,CAEjE"}
@@ -0,0 +1,8 @@
1
+ import {isNativeFunction} from './is-native-function'
2
+ export function isObjectHasOwnSupported() {
3
+ return 'hasOwn' in Object && typeof Object.hasOwn === 'function'
4
+ }
5
+ export function isObjectHasOwnSupportedWithoutPolyfills() {
6
+ return isObjectHasOwnSupported() && isNativeFunction(Object.hasOwn)
7
+ }
8
+ //# sourceMappingURL=is-object-hasown-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-object-hasown-supported.js","sourceRoot":"","sources":["../../src/checks/is-object-hasown-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,uBAAuB;IACrC,OAAO,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,CAAA;AAClE,CAAC;AAED,MAAM,UAAU,uCAAuC;IACrD,OAAO,uBAAuB,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACrE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isRequestIdleCallbackSupported(): boolean
2
+ export declare function isObjectHasOwnSupportedWithoutPolyfills(): boolean
3
+ //# sourceMappingURL=is-requestidlecallback-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-requestidlecallback-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-requestidlecallback-supported.ts"],"names":[],"mappings":"AAEA,wBAAgB,8BAA8B,IAAI,OAAO,CAExD;AAED,wBAAgB,uCAAuC,IAAI,OAAO,CAEjE"}
@@ -0,0 +1,8 @@
1
+ import {isNativeFunction} from './is-native-function'
2
+ export function isRequestIdleCallbackSupported() {
3
+ return 'hasOwn' in Object && typeof Object.hasOwn === 'function'
4
+ }
5
+ export function isObjectHasOwnSupportedWithoutPolyfills() {
6
+ return isObjectHasOwnSupported() && isNativeFunction(Object.hasOwn)
7
+ }
8
+ //# sourceMappingURL=is-requestidlecallback-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-requestidlecallback-supported.js","sourceRoot":"","sources":["../../src/checks/is-requestidlecallback-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,8BAA8B;IAC5C,OAAO,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,CAAA;AAClE,CAAC;AAED,MAAM,UAAU,uCAAuC;IACrD,OAAO,uBAAuB,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACrE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function isSupportedWithoutPolyfills(): any
2
+ //# sourceMappingURL=is-supported-without-polyfills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-supported-without-polyfills.d.ts","sourceRoot":"","sources":["../../src/checks/is-supported-without-polyfills.ts"],"names":[],"mappings":"AAIA,wBAAgB,2BAA2B,QAM1C"}
@@ -0,0 +1,14 @@
1
+ import {isSupported} from './is-supported.js'
2
+ import {isNativeFunction} from './is-native-function.js'
3
+ import {isEventAbortSignalSupported} from './is-event-abortsignal-supported.js'
4
+ export function isSupportedWithoutPolyfills() {
5
+ return (
6
+ isSupported() &&
7
+ isNativeFunction(crypto.randomUUID) &&
8
+ isNativeFunction(Object.hasOwn) &&
9
+ isNativeFunction(requestIdleCallback) &&
10
+ isEventAbortSignalSupported() &&
11
+ isNativeFunction(EventTarget.prototype.addEventListener)
12
+ )
13
+ }
14
+ //# sourceMappingURL=is-supported-without-polyfills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-supported-without-polyfills.js","sourceRoot":"","sources":["../../src/checks/is-supported-without-polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAA;AAEjF,MAAM,UAAU,2BAA2B;IACvC,OAAO,WAAW,EAAE;QAChB,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC;QACnC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/B,gBAAgB,CAAC,mBAAmB,CAAC;QACrC,CAAC,2BAA2B,EAAE,IAAI,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAA;AACnG,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function isSupported(): boolean
2
+ export declare function isSupportedWithoutPolyfills(): boolean
3
+ //# sourceMappingURL=is-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-supported.d.ts","sourceRoot":"","sources":["../../src/checks/is-supported.ts"],"names":[],"mappings":"AAyBA,wBAAgB,WAAW,YAK1B;AAED,wBAAgB,2BAA2B,YAK1C"}
@@ -0,0 +1,38 @@
1
+ import {
2
+ isCryptoRandomUUIDSupported,
3
+ isCryptoRandomUUIDSupportedWithoutPolyfills
4
+ } from './is-crypto-randomuuid-supported'
5
+ import {isEventAbortSignalSupported, isEventAbortSignalSupportedWithoutPolyfils} from './is-event-abortsignal-supported'
6
+ import {isObjectHasOwnSupported, isObjectHasOwnSupportedWithoutPolyfills} from './is-object-hasown-supported'
7
+ const baseSupport =
8
+ typeof Blob === 'function' &&
9
+ typeof PerformanceObserver === 'function' &&
10
+ typeof Intl === 'object' &&
11
+ typeof MutationObserver === 'function' &&
12
+ typeof URLSearchParams === 'function' &&
13
+ typeof WebSocket === 'function' &&
14
+ typeof IntersectionObserver === 'function' &&
15
+ typeof queueMicrotask === 'function' &&
16
+ typeof TextEncoder === 'function' &&
17
+ typeof TextDecoder === 'function' &&
18
+ typeof customElements === 'object' &&
19
+ typeof HTMLDetailsElement === 'function' &&
20
+ typeof AbortController === 'function' &&
21
+ typeof AbortSignal === 'function' &&
22
+ 'fromEntries' in Object &&
23
+ 'entries' in FormData.prototype &&
24
+ 'toggleAttribute' in Element.prototype &&
25
+ 'flatMap' in Array.prototype &&
26
+ 'replaceChildren' in Element.prototype
27
+ export function isSupported() {
28
+ return baseSupport && isObjectHasOwnSupported() && isCryptoRandomUUIDSupported() && isEventAbortSignalSupported()
29
+ }
30
+ export function isSupportedWithoutPolyfills() {
31
+ return (
32
+ baseSupport &&
33
+ isObjectHasOwnSupportedWithoutPolyfills() &&
34
+ isCryptoRandomUUIDSupportedWithoutPolyfills() &&
35
+ isEventAbortSignalSupportedWithoutPolyfils()
36
+ )
37
+ }
38
+ //# sourceMappingURL=is-supported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-supported.js","sourceRoot":"","sources":["../../src/checks/is-supported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,2CAA2C,EAAE,MAAM,kCAAkC,CAAA;AAC3H,OAAO,EAAE,2BAA2B,EAAE,0CAA0C,EAAE,MAAM,kCAAkC,CAAA;AAC1H,OAAO,EAAE,uBAAuB,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAA;AAE/G,MAAM,WAAW,GACb,OAAO,IAAI,KAAK,UAAU;IAC1B,OAAO,mBAAmB,KAAK,UAAU;IACzC,OAAO,IAAI,KAAK,QAAQ;IACxB,OAAO,gBAAgB,KAAK,UAAU;IACtC,OAAO,eAAe,KAAK,UAAU;IACrC,OAAO,SAAS,KAAK,UAAU;IAC/B,OAAO,oBAAoB,KAAK,UAAU;IAC1C,OAAO,cAAc,KAAK,UAAU;IACpC,OAAO,WAAW,KAAK,UAAU;IACjC,OAAO,WAAW,KAAK,UAAU;IACjC,OAAO,cAAc,KAAK,QAAQ;IAClC,OAAO,kBAAkB,KAAK,UAAU;IACxC,OAAO,eAAe,KAAK,UAAU;IACrC,OAAO,WAAW,KAAK,UAAU;IACjC,aAAa,IAAI,MAAM;IACvB,SAAS,IAAI,QAAQ,CAAC,SAAS;IAC/B,iBAAiB,IAAI,OAAO,CAAC,SAAS;IACtC,SAAS,IAAI,KAAK,CAAC,SAAS;IAC5B,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAA;AAE1C,MAAM,UAAU,WAAW;IACzB,OAAO,WAAW;QAChB,uBAAuB,EAAE;QACzB,2BAA2B,EAAE;QAC7B,2BAA2B,EAAE,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,2BAA2B;IACzC,OAAO,WAAW;QACd,uCAAuC,EAAE;QACzC,2CAA2C,EAAE;QAC7C,0CAA0C,EAAE,CAAA;AAClD,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare function randomUUID(): string;
2
+ declare global {
3
+ interface Crypto {
4
+ randomUUID(): string;
5
+ }
6
+ }
7
+ export declare function isSupported(): boolean;
8
+ export declare function isPolyfilled(): boolean;
9
+ export declare function apply(): void;
10
+ //# sourceMappingURL=crypto-randomuuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto-randomuuid.d.ts","sourceRoot":"","sources":["../src/crypto-randomuuid.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,WAUzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,IAAI,MAAM,CAAA;KACrB;CACF;AAGD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,KAAK,IAAI,IAAI,CAI5B"}