Provides Babel's internal helper functions (like _classCallCheck, _extends, etc.) as individual ES5 modules that can be imported directly. Version 6.0.0 is the latest stable release. Unlike babel-runtime which bundles core-js, this package avoids core-js dependencies, giving users freedom to choose their own polyfill (e.g., @babel/polyfill). Designed to be used with babel-plugin-transform-helper-modules to replace helper calls with direct imports, reducing bundle size and avoiding duplicate helper code. Supports only CommonJS require syntax and is intended for Node/Babel build pipelines.
npm install babel-helper-modulesVerified import paths — ran on the pinned version, not inferred.
Shows importing and using multiple Babel helper modules from the package, demonstrating classCallCheck, inherits, extends, objectWithoutProperties, and possibleConstructorReturn.
Use `var helper = require('babel-helper-modules').helperName;` instead of `import`.Assign to a different variable name: `var _extends = require('babel-helper-modules').extends;`Migrate to @babel/runtime and @babel/plugin-transform-runtime for Babel 7+.
Create a custom .d.ts file or use `require` with `@ts-ignore`.
Add @babel/polyfill or core-js to your project and import it early.
Change to `var helper = require('babel-helper-modules').helperName;`Ensure you use `require('babel-helper-modules').classCallCheck` and not `require('babel-helper-modules')` alone.Rename the imported helper: `var _extends = require('babel-helper-modules').extends;`Run `npm install babel-helper-modules --save` or `yarn add babel-helper-modules`.
No dependency data recorded yet.