
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@wide/polyfiller
Advanced tools
Load polyfills on demand.
npm install @wide/polyfiller --save
This exemple will load assets/polyfills/object-assign.js on IE 11 only:
import polyfiller from '@wide/polyfiller'
polyfiller({
path: 'assets/polyfills/',
load: {
'object-assign.js': {
ie: '<=11'
}
}
})
path public folder of compiled polyfillsload collection of polyfills to load, accept a key/value combination
key: filename or url of the polyfillvalue: criteria to satisfies (see bowser.satisfied)@wide/polyfiller comes with a set of well-known polyfills:
babel.js: core-js/stable and regenerator-runtime/runtimeclosest.js: element-closest-polyfillobject-fit.js: object-fit-images and object-fit-videospicture-fill.js: picturefillobject-assign.js: es6-object-assignfetch: whatwg-fetchsvg.js: svg4everybodyThese polyfills can be loaded in two steps, first import the needed ones using the presets collection:
import polyfiller from '@wide/polyfiller'
import presets from '@wide/polyfiller/lib/presets'
polyfiller({
path: 'assets/polyfills/',
load: {
...preset.babel,
...preset.fetch,
}
})
Then, you need to compile them into the assets/polyfills:
// assets/polyfills/babel.js
import '@wide/polyfiller/lib/presets/babel'
// assets/polyfills/fetch.js
import '@wide/polyfiller/lib/presets/fetch'
To resolve which polyfill must be loaded, @wide/polyfiller makes use of the bowser lib and expose the main feature of the browser:
import capabilities from '@wide/polyfiller/lib/capabilities'
capabilities.touch // true | false
capabilities.platform // desktop | mobile
capabilities.os // linux | macos | windows
capabilities.engine // trident | gecko
capabilities.name // ie | chrome | firefox
capabilities.version // number
capabilities.chrome // true | false
capabilities.opera // true | false
capabilities.firefox // true | false
capabilities.safari // true | false
capabilities.edge // true | false
capabilities.ie // true | false
capabilities.webp // true | false
These capabilities can be exposed as window.capabilities and body css classes:
import { expose } from '@wide/polyfiller/lib/capabilities'
expose()
This package uses :
This project is licensed under the MIT License - see the licence file for details
FAQs
Polyfills loader on demand.
We found that @wide/polyfiller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.