lodash._basecopy is an internal Lodash module, specifically version 3.0.1, published over a decade ago in April 2015. It exposes the `baseCopy` function, which is a core utility used internally by Lodash for copying object properties. This package is part of the older Lodash v3 ecosystem, which predates the significant breaking changes and modularization introduced in Lodash v4. While Lodash itself (currently v4.18.1) is actively maintained with a regular release cadence addressing bugs and security, `lodash._basecopy` is effectively abandoned as a standalone, directly consumable package. Modern Lodash encourages direct function imports from `lodash` or `lodash-es` rather than using these older, internal micro-modules, many of which are slated for removal in Lodash v5.
npm install lodash._basecopyVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the `lodash._basecopy` CommonJS module for shallow copying and compares it to modern Lodash public API equivalents for shallow and deep copies.
Migrate to using public Lodash API functions like `_.assign()`, `_.clone()` or `_.cloneDeep()` directly from the main `lodash` package. For specific functions, import them directly (e.g., `require('lodash/assign')` or `import assign from 'lodash/assign'`).Instead of `require('lodash._basecopy')`, use direct function imports from the main `lodash` package (e.g., `require('lodash/assign')` for CJS or `import assign from 'lodash/assign'` for ESM with tree-shaking bundlers like Webpack/Rollup). For more complex scenarios, import the full `lodash` package and use its methods.For deep copying, use `_.cloneDeep()` from the main Lodash library. Ensure you understand the difference between shallow and deep copies for your use case.
Migrate away from this package to supported methods within the actively maintained `lodash` package (version 4.18.1 or newer) to ensure you receive important security updates.
Ensure the package is installed (`npm install lodash._basecopy`) if you must use it (though not recommended). More importantly, migrate to standard Lodash functions like `_.assign` or `_.cloneDeep` which are actively supported and exposed in the main `lodash` package.
For `_basecopy` and similar granular modules, switch to the main `lodash` package and import specific functions like `import { assign } from 'lodash';` or `const assign = require('lodash/assign');`. If using a bundler with tree-shaking, `import { assign } from 'lodash';` can be optimized.No dependency data recorded yet.