{"id":14678,"library":"lodash._arraycopy","title":"Lodash Internal Array Copy Utility","description":"lodash._arraycopy is a standalone npm package that provides the internal `arrayCopy` utility function from the Lodash library as a modularized component. This package was last updated with version 3.0.0, released in 2015, following semantic versioning practices for its specific release cycle. While the core `arrayCopy` functionality remains integral and actively maintained within the main Lodash library (which is currently at v4.x and receives regular updates and security patches), the `lodash._arraycopy` *npm package itself* is not independently maintained or updated. Its primary purpose was to expose an internal helper for environments that required modular consumption of Lodash's foundational utilities. For modern JavaScript projects, it is strongly recommended to use the comprehensive `lodash` or `lodash-es` packages, which encapsulate and maintain this functionality as part of a larger, actively developed codebase, rather than relying on this outdated standalone module.","status":"abandoned","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/lodash/lodash","tags":["javascript"],"install":[{"cmd":"npm install lodash._arraycopy","lang":"bash","label":"npm"},{"cmd":"yarn add lodash._arraycopy","lang":"bash","label":"yarn"},{"cmd":"pnpm add lodash._arraycopy","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS only, reflecting its age (v3.0.0 from 2015). Direct ES module imports are not supported.","wrong":"import arrayCopy from 'lodash._arraycopy';","symbol":"arrayCopy","correct":"const arrayCopy = require('lodash._arraycopy');"}],"quickstart":{"code":"const arrayCopy = require('lodash._arraycopy');\n\nconst sourceArray = [1, 2, 3, 4, 5];\nconst destinationArray = new Array(sourceArray.length);\nconst sourceStart = 0;\nconst destinationStart = 0;\nconst length = sourceArray.length;\n\n// Copies elements from sourceArray to destinationArray\narrayCopy(sourceArray, destinationArray, destinationStart, sourceStart, length);\n\nconsole.log(destinationArray); // Expected: [1, 2, 3, 4, 5]\n\nconst anotherSource = ['a', 'b', 'c'];\nconst anotherDest = ['x', 'y', 'z', 'w'];\n// Copy 'b', 'c' from anotherSource to anotherDest starting at index 1 of anotherDest\n// anotherDest becomes ['x', 'b', 'c', 'w']\narrayCopy(anotherSource, anotherDest, 1, 1, 2);\nconsole.log(anotherDest); // Expected: ['x', 'b', 'c', 'w']","lang":"javascript","description":"Demonstrates how to import and use the `arrayCopy` function to copy elements between arrays."},"warnings":[{"fix":"Migrate to using the main `lodash` or `lodash-es` packages, which include this functionality as part of a currently maintained codebase. Direct usage of internal Lodash modules like this is discouraged.","message":"This specific package (`lodash._arraycopy`) is considered abandoned. Its last update was v3.0.0 in 2015. It will not receive new features, bug fixes, or security patches.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Ensure you are using `const arrayCopy = require('lodash._arraycopy');` in Node.js environments. For browser usage, a CommonJS compatible bundler is required.","message":"This package exclusively supports CommonJS (`require`). Attempting to use ES module `import` syntax will result in errors.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Verify the import statement is `const arrayCopy = require('lodash._arraycopy');`. If using ES modules, you may need to configure your bundler (e.g., Webpack, Rollup) to correctly handle CommonJS modules or, preferably, switch to `lodash` or `lodash-es`.","cause":"Incorrect import statement or module resolution failure due to CJS/ESM mismatch in a modern environment.","error":"TypeError: lodash._arraycopy is not a function or module"}],"ecosystem":"npm"}