“for-each” is a small JavaScript utility that works like Array.prototype.forEach but can iterate over objects, passing (value, key, object) to the callback. It can also be used as a polyfill or shim for arrays, making it useful when you want consistent forEach-style iteration across arrays and objects.
Project status
- The source appears actively maintained, with an upstream push and recent tag update on 2025-02-11 (v0.3.5), after an earlier update on 2025-01-24 (v0.3.4).
- The apparent update cadence is not consistent long-term, but recent updates are close together, about 3 weeks apart (v0.3.4 to v0.3.5).
AI summary generated Today
Recent updates
v0.3.5
2/11/2025v0.3.5 adds TypeScript typings for the CommonJS `forEach` export and introduces TypeScript into the project’s lint workflow (tsc plus arethetypeswrong). The runtime iteration logic in `index.js` is mostly refactored for clarity, with an internal `isArray` helper replacing the previous inline `[object Array]` check.
Featuresv0.3.4
1/24/2025v0.3.4 primarily updates project tooling and repository automation (CI workflows, lint/test scripts, release metadata), with only a small runtime-relevant change: a dependency bump. No changes to the actual for-each implementation or exported API surface are present in the provided diff.
v0.3.3
6/2/2018Release v0.3.3 was published on 2018-06-02, but no release notes or change descriptions were provided by the publisher. As a result, there is no actionable information available here to identify new features, breaking changes, bug fixes, or security updates.
v0.3.2
1/7/2014Version v0.3.2 makes a small internal change to how the forEach iterator is validated, and adds a new runtime dependency. No release notes were provided, so the functional impact of the change is not documented.
v0.3.1
1/7/2014The release notes for v0.3.1 are missing or not provided. The code diff shows the only change is a version bump in package.json from 0.3.0 to 0.3.1.
v0.3.0
1/7/2014v0.3.0 refactors the implementation of the exported `forEach` function and updates project metadata. The release notes section is empty, so the code changes below are not explained by the publisher.
Breakingv0.2.0
5/11/2013v0.2.0 updates the core forEach implementation and test tooling. The main behavioral changes are stricter iterator validation and different iteration semantics for arrays, strings, and potentially sparse arrays. Release notes were not provided, so the full set of behavior changes cannot be confirmed as documented.
v0.1.0
9/29/2012Release v0.1.0 was published on 2012-09-29, but no release notes were provided by the publisher. As a result, no specific new features, bug fixes, breaking changes, or security updates can be confirmed from the release notes alone.