Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@babel/helper-split-export-declaration
Advanced tools
The @babel/helper-split-export-declaration package is a utility within the Babel compiler ecosystem. It is designed to assist in the transformation of ECMAScript modules by splitting export declarations that have associated expressions. This is particularly useful in the process of transpiling code to be compatible with environments that have varying levels of support for ES modules.
Splitting Export Declarations
This feature allows the transformation of export statements in JavaScript modules, particularly those that export a declaration and its value in a single statement. The code sample demonstrates how an export default declaration would be transformed to separate the declaration and the export, ensuring compatibility with environments that may not fully support the latest ECMAScript module syntax.
"use strict";\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = void 0;\nvar _default = 'Hello, world!';\nexports.default = _default;"
This package is part of the Babel ecosystem and transforms ES2015 modules to CommonJS, allowing code to run in environments that do not support ES modules natively. It provides similar functionality to @babel/helper-split-export-declaration by handling module exports in a way that ensures compatibility across different JavaScript environments. However, it is more comprehensive, targeting the entire module system rather than focusing solely on export declarations.
Similar to @babel/helper-split-export-declaration, this Babel plugin transforms ES2015 modules to Asynchronous Module Definition (AMD) format. While it serves a similar purpose in terms of making module exports compatible with different environments, it targets AMD rather than CommonJS or other module systems. This makes it suitable for projects that specifically require AMD compatibility.
See our website @babel/helper-split-export-declaration for more information.
Using npm:
npm install --save-dev @babel/helper-split-export-declaration
or using yarn:
yarn add @babel/helper-split-export-declaration --dev
v7.16.0 (2021-10-30)
babel-helpers
, babel-plugin-proposal-async-generator-functions
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
for-await
(@nicolo-ribaudo)babel-generator
, babel-parser
, babel-plugin-transform-typescript
, babel-types
babel-parser
babel-helper-fixtures
, babel-helper-transform-fixture-test-runner
, babel-parser
, babel-plugin-syntax-typescript
, babel-preset-typescript
.mts
and .cts
files in @babel/preset-typescript
(@nicolo-ribaudo)@babel/eslint-parser
(@nicolo-ribaudo)babel-generator
, babel-parser
, babel-plugin-proposal-pipeline-operator
, babel-plugin-syntax-pipeline-operator
babel-compat-data
, babel-generator
, babel-parser
, babel-preset-env
, babel-types
babel-helper-skip-transparent-expression-wrappers
, babel-plugin-proposal-optional-chaining
skipTransparentExprWrapperNodes
helper (@lightmare)babel-traverse
, babel-types
babel-parser
, babel-plugin-transform-typescript
babel-plugin-transform-typescript
babel-core
, babel-helper-create-class-features-plugin
, babel-plugin-transform-typescript
babel-compat-data
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-transform-react-constant-elements
, babel-preset-env
, babel-traverse
babel-plugin-proposal-async-generator-functions
, babel-traverse
babel-traverse
, babel-types
babel-generator
workspace:^
to specify @babel/
dependencies (@nicolo-ribaudo)babel-helper-fixtures
, babel-plugin-proposal-class-properties
, babel-plugin-transform-runtime
, babel-preset-react
babel-types
createTypeAnnotationBasedOnTypeof
(babel-types) (@lightmare)babel-helpers
babel-core
, babel-plugin-transform-react-jsx-development
, babel-plugin-transform-react-jsx
, babel-types
babel-types
FAQs
Unknown package
The npm package @babel/helper-split-export-declaration receives a total of 28,037,782 weekly downloads. As such, @babel/helper-split-export-declaration popularity was classified as popular.
We found that @babel/helper-split-export-declaration demonstrated a healthy version release cadence and project activity because the last version was released less than 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.