for-each is a performant, drop-in replacement for Array.prototype.forEach that works across browsers and Node.js. This package offers a consistent and reliable way to iterate over array elements, ensuring predictable behavior regardless of the JavaScript environment. It addresses potential inconsistencies and browser-specific quirks associated with native forEach implementations, providing a standardized solution for looping through arrays. It's particularly useful for legacy environments or when strict cross-browser compatibility is critical.
The 'for-each' npm package had infrequent releases. Initial release was in September 2012, followed by two releases in January 2014. A single release occurred in June 2018. More recently, there was a release in January 2025 and February 2025. There have been no releases since February 2025.
The npm package "for-each" experienced significant download growth from March 2024 to August 2025, peaking at over 205 million downloads. However, September 2025 shows a sharp decline, with only around 62 million downloads, likely due to the month being incomplete.