
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@babel/plugin-syntax-top-level-await
Advanced tools
Allow parsing of top-level await in modules
The @babel/plugin-syntax-top-level-await package allows Babel to parse top-level await expressions. This is particularly useful for enabling asynchronous module loading directly at the top level of your modules, without needing to wrap them in async functions. It's a syntax-only plugin, meaning it allows Babel to understand this syntax but does not transform it. This is useful for environments that support top-level await natively.
Parsing top-level await expressions
Enables Babel to parse top-level await expressions, allowing for direct, asynchronous operations at the module level without wrapping in an async function.
await fetch('https://example.com/data');
While not exclusively focused on top-level await, @babel/preset-env is a smart preset that allows you to use the latest JavaScript without needing to micromanage syntax transformations and the browser polyfills necessary for your target environment. It includes transformations for async/await but does not specifically target top-level await syntax.
TypeScript, a superset of JavaScript, supports async/await and has been updated to support top-level await in modules for environments that support it. While TypeScript is much broader in scope, offering type checking and other features, it provides similar functionality in terms of understanding and utilizing top-level await.
Allow parsing of top-level await in modules
See our website @babel/plugin-syntax-top-level-await for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-top-level-await
or using yarn:
yarn add @babel/plugin-syntax-top-level-await --dev
FAQs
Allow parsing of top-level await in modules
The npm package @babel/plugin-syntax-top-level-await receives a total of 25,152,962 weekly downloads. As such, @babel/plugin-syntax-top-level-await popularity was classified as popular.
We found that @babel/plugin-syntax-top-level-await demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.