
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
polyfill-io-loader
Advanced tools
npm i polyfill-io-loader --save-dev
Lazy load - evergreen browsers that support all the given features will not contact polyfill.io at all - it will just initialise the main app. This avoids an unnecessary http round trip.
Retrieve minimal polyfills - it will only pull the missing functionality your browser needs and not all the polyfills you list.
Load from custom self hosted url/cdn - if your self hosting your own polyfill.io then you can point it towards your CDN url.
import loadPolyfills from 'polyfill-io-loader!?Promise,NodeList.prototype.forEach,Object.assign';
loadPolyfills(function() {
// All polyfills have been loaded.
// Initialise your app here.
});
import loadPolyfills from 'polyfill-io-loader!?Promise,url=http://my-custom-cdn.com';
When the loader runs, it pulls the minimal js detections code for each of the polyfills you list in the import. At runtime of your app, it will check all the detections then make a request to polyfill.io with all the missing functionality:
So for example:
import loadPolyfills from 'polyfill-io-loader!?Promise,fetch,Object.assign';
If the browser supports Promise
but not fetch
or Object.assign
, the following request will be made to polyfill.io:
https://polyfill.io/v3/polyfill.min.js?features=fetch,Object.assign&flags=always
This library aims to be lightweight and minimal, but if you feel a new option or functionality is required, please create an issue for feedback.
FAQs
Minimal polyfill.io loader for Webpack
The npm package polyfill-io-loader receives a total of 0 weekly downloads. As such, polyfill-io-loader popularity was classified as not popular.
We found that polyfill-io-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.