
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.
babel-preset-mjs
Advanced tools
Babel preset to transpile JS to restricted mjs JS.
Restriction | Solution |
---|---|
No String, Number, RegExp, Date, Function, etc. | Not solved |
No try/catch/finally. | Transpiled to functions that make try/catch/finally work. |
No error classes. | Not solved |
No new or prototypes. In order to create an object with a custom prototype, use Object.create() , which is available. | new is handled by Object.create() , and the constructor is called on the resultant object |
Strict mode only. No for..of , => , destructors, generators, proxies, promises, classes, template strings. | Handled by babel-preset-es2015 (included by default). |
No var , only let . | All uses of var are changed to let . |
No getters, setters, valueOf . | Not solved |
No == or != , only === and !== . | All uses of == are transpiled to a manually evaluated loose equals. |
load() is used to load external JS, not very standardized and pollutes the global scope. | Not solved |
No setTimeout() and setInterval() API. | Polyfilled using api_timer.js . |
.babelrc
:
{
"presets": [
"mjs"
]
}
Licensed under MIT license.
Copyright (C) 2017 Karim Alibhai.
FAQs
Babel preset to transpile JS to restricted mjs JS.
The npm package babel-preset-mjs receives a total of 2 weekly downloads. As such, babel-preset-mjs popularity was classified as not popular.
We found that babel-preset-mjs 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.