File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import * as promiseAny from './promise-any.js'
1111import * as requestIdleCallback from './requestidlecallback.js'
1212import * as stringReplaceAll from './string-replaceall.js'
1313
14- const baseSupport =
14+ export const baseSupport =
1515 typeof Blob === 'function' &&
1616 typeof PerformanceObserver === 'function' &&
1717 typeof Intl === 'object' &&
@@ -44,7 +44,7 @@ const baseSupport =
4444 // 'at' in Array.prototype && // Polyfilled
4545 true
4646
47- const polyfills = [
47+ export const polyfills = {
4848 abortSignalAbort,
4949 abortSignalTimeout,
5050 aggregateError,
@@ -57,25 +57,25 @@ const polyfills = [
5757 promiseAny,
5858 requestIdleCallback,
5959 stringReplaceAll
60- ]
60+ }
6161
6262export function isSupported ( ) {
6363 return (
6464 baseSupport &&
65- polyfills . every ( polyfill => {
65+ Object . values ( polyfills ) . every ( polyfill => {
6666 polyfill . isSupported ( )
6767 } )
6868 )
6969}
7070
7171export function isPolyfilled ( ) {
72- return polyfills . every ( polyfill => {
72+ return Object . values ( polyfills ) . every ( polyfill => {
7373 polyfill . isPolyfilled ( )
7474 } )
7575}
7676
7777export function apply ( ) {
78- for ( const polyfill of polyfills ) {
78+ for ( const polyfill of Object . values ( polyfills ) ) {
7979 polyfill . apply ( )
8080 }
8181}
You can’t perform that action at this time.
0 commit comments