Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
module-workers-polyfill
Advanced tools
This is a 1.1kb polyfill for Module Workers.
It adds support for new Worker('..',{type:'module'})
to all modern browsers (those that support fetch).
Just load module-workers-polyfill.js
using an import or a script tag, before instantiating your Worker.
<script src="/module-workers-polyfill.js"></script>
<script>
const worker = new Worker('/worker.mjs', { type: 'module' });
</script>
// load the polyfill:
import '/module-workers-polyfill.js';
// now we can use import-from-worker, which relies on Module Workers:
import importFromWorker from 'https://unpkg.com/import-from-worker@1.0.1/dist/import-from-worker.js';
function getAcornAST(code) {
const { parse } = await importFromWorker('https://unpkg.com/acorn@7.1.0/dist/acorn.mjs');
return await parse(code, { sourceType: 'module' });
}
FAQs
Unknown package
We found that module-workers-polyfill 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.