Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
arrayEach
✓ const arrayEach = require('lodash._arrayeach');
✗ import { arrayEach } from 'lodash._arrayeach';
This package is a CommonJS module from Lodash v3. It does not support ES module imports directly. Attempting to use named imports will result in a TypeError.
Demonstrates how to import and use the internal `arrayEach` function to iterate over an array.
const arrayEach = require('lodash._arrayeach');
const numbers = [10, 20, 30, 40, 50];
const doubledNumbers = [];
console.log('Original numbers:', numbers);
arrayEach(numbers, (value, index) => {
doubledNumbers[index] = value * 2;
});
console.log('Doubled numbers:', doubledNumbers);
// Demonstrating the internal nature: it's not the public _.forEach
const sparseArray = [1, , 3]; // eslint-disable-line no-sparse-arrays
const resultSparse = [];
arrayEach(sparseArray, (value) => resultSparse.push(value === undefined ? 'undefined' : value));
console.log('ArrayEach on sparse array (handles undefined):', resultSparse);
Debug
Known issues
breakingThis `lodash._arrayeach` package is based on Lodash v3.0.0. The main `lodash` library moved to v4.0.0 in 2015, which introduced significant backward-incompatible changes across the entire library. Using this v3 internal module alongside a modern v4+ `lodash` installation may lead to inconsistent behavior or conflicts due to differing internal implementations.fixMigrate to `_.forEach` from a current `lodash` package (v4.x) or `lodash-es` for tree-shakable builds. Avoid direct usage of internal modules like `lodash._arrayeach`.
affects: >=3.0.0 (in context of Lodash v4+ projects)
deprecatedThis package is an abandoned internal module from Lodash v3.0.0 and has not received updates since its initial release. Modern Lodash (v4.x) provides similar or improved functionality through its public API (e.g., `_.forEach` for array iteration) and `lodash-es` for modular, tree-shakable builds, which are actively maintained.fixRefactor code to use `_.forEach` directly from the main `lodash` package or `lodash-es`. For example: `import { forEach } from 'lodash'; forEach(array, callback);` affects: >=3.0.0
gotchaRelying on internal modules like `lodash._arrayeach` is discouraged as they are not part of Lodash's stable public API. Their behavior, existence, and compatibility can change without warning across major versions of the main `lodash` library, leading to unexpected issues during upgrades.fixAlways use public API functions provided by the main `lodash` package. For array iteration, `_.forEach` is the robust and supported choice.
affects: >=3.0.0
gotchaUsing older versions of any library, including `lodash` and its internal modules from v3, means foregoing security patches and bug fixes. For example, `lodash` v4.18.0 fixed prototype pollution vulnerabilities in `_.unset` and `_.omit` (GHSA-f23m-r3pf-42rh) which would not be present in a v3 codebase.fixUpgrade to the latest stable version of the main `lodash` package (v4.x) to benefit from continuous security maintenance and bug fixes. Avoid using outdated internal modules.
affects: >=3.0.0 (all 3.x versions)
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'call') at Function.arrayEach
Attempting to call `arrayEach` with a non-array or null/undefined `collection` argument.
fixEnsure the first argument passed to `arrayEach` is always an array. Example: `arrayEach([], callback);`
TypeError: arrayEach is not a function
Incorrectly trying to import `arrayEach` using ES module syntax or destructuring from the CommonJS package.
fixUse the correct CommonJS `require` syntax: `const arrayEach = require('lodash._arrayeach');` Error: Cannot find module 'lodash._arrayeach'
The package `lodash._arrayeach` has not been installed or is not resolvable in the current environment.
fixInstall the package via npm: `npm install --save lodash._arrayeach`
Audit
Dependencies
No dependency data recorded yet.