A small JavaScript utility (err-code) for creating Error instances that include a code and optional additional properties. It helps standardize how you set error.code (and related fields) when throwing errors, including preserving the original message and stack.
Project status
- The last recorded upstream push was 2022-06-22, and the most recent tagged update shown here is v3.0.0 from 2021-02-02, so the project appears quiet, likely not actively maintained as of 2026-08-12.
- Update/release cadence is sparse (2020-06 updates, then v3.0.0 in 2021, with no further tagged updates indicated after 2021-02 in the provided history), suggesting low ongoing development activity.
AI summary generated
Recent updates
v3.0.0
v3.0.0 introduces TypeScript support by adding an exported type definition file (index.d.ts) plus a TypeScript build configuration and a CI workflow to run typechecking on pull requests. The diff also updates test tooling annotations and changes several devDependency versions, indicating broader tooling churn beyond runtime logic.
BreakingFeaturesv2.0.3
Release v2.0.3 has no release notes provided. The code change is centered on relaxing input validation for error creation, and the repo also bumps development dependencies (browserify, eslint, mocha).
Featuresv2.0.2
This release (v2.0.2) does not include any release notes from the publisher. As a result, no documented changes, fixes, or upgrade guidance are available for developers to review.
v2.0.1
Release v2.0.1 contains a small behavioral change to how err-code populates error fields. The implementation now avoids writing to frozen Error objects and avoids overwriting properties that are defined as non-writable.
Breakingv2.0.0
This release (v2.0.0) changes the primary API behavior of the module, enforcing that the first argument is an actual Error instance. It also updates CI configuration and refreshes the repository metadata (README formatting and a newly added package-lock.json). Release notes were not provided, so the documented change set cannot be validated against the diff.
1.1.2
This release (1.1.2) appears to update development tooling and project metadata rather than changing the library's runtime behavior. The diff shows updates to ESLint configuration, README badge/example text, and major-version bumps to development dependencies.
1.1.1
Release 1.1.1 does not include any publisher-provided release notes. The code diff shows only a documentation comment change in README.md and version number bumps in bower.json and package.json.
1.1.0
Release 1.1.0 introduces a browser-compatible UMD build (index.umd.js) and updates the library’s error factory behavior to support passing an object as the second argument for error properties. It also updates the README and test suite accordingly, and adjusts build and dev tooling configuration.
BreakingFeatures1.0.0
Release 1.0.0 includes a behavioral change to how error objects are created, plus project metadata and tooling updates (README, bower.json, CI node versions). The provided release notes contain no content, so all functional changes must be inferred from the code diff.
BreakingFeatures0.1.1
Release 0.1.1 was published on 2014-07-17, but the publisher did not provide any release notes. No details are available here to determine whether this version includes new features, bug fixes, breaking changes, or security updates.