long.js provides a Long class for representing 64-bit two's-complement integers in JavaScript, including unsigned support. It is useful when you need reliable 64-bit arithmetic and bitwise-style operations beyond what the JavaScript Number type can safely represent.
Project status
- Maintenance status: The repository appears quiet/in maintenance mode. The most recent upstream push was 2025-04-17, which is over a year ago relative to 2026-07-30, and the updates show no recent activity since then.
- Update cadence: There was a burst of updates in early 2025 (versions 5.2.x to 5.3.2 across Jan to Apr 2025), but after that there is a long gap with no further updates.
AI summary generated
Recent updates
v5.3.2
v5.3.2 includes a targeted bug fix for Long.fromValue when the runtime BigInt implementation is available. The release also bumps the dev dependency esm2umd from 0.3.0 to 0.3.1.
v5.3.1
v5.3.1 focuses on TypeScript typing fixes for separating ESM and UMD usage, plus various CI and formatting updates. The code diff also shows build pipeline changes to generate and format UMD artifacts using a new script, and it adds tooling configuration for formatting/linting.
v5.3.0
v5.3.0 adds BigInt interoperability (notably conversion to and from Long) and introduces a new Long instance method, isSafeInteger. The release also refactors TypeScript declaration files into a dedicated types.d.ts and refreshes the embedded WebAssembly blob (with accompanying WAT/source changes).
Featuresv5.2.5
v5.2.5 contains a small compatibility fix related to ECMAScript module resolution, plus README badge link updates. The code diff shows changes limited to the published type definitions and the documentation badges, with no runtime logic changes.
v5.2.4
v5.2.4 primarily changes where the package's TypeScript declarations are sourced from to fix a TypeScript import issue in the 5.x line. The release notes describe this as a bug fix, but the diff shows a large reorganization of declaration files between index.d.ts and umd/index.d.ts.
v5.2.3
Release v5.2.3 is described as a bug fix that reorders module exports in package.json. The code diff shows only a reordering of the keys within the existing exports map, with no apparent change to the exported paths themselves.
v5.2.2
v5.2.2 primarily changes how TypeScript definitions are delivered for ESM vs CJS builds, aligning TS types with the package export map. The release notes mention ESM/CJS TS separation, but the diff shows additional, potentially breaking changes to the TS export style and where the type declarations are resolved.
v5.2.1
Release v5.2.1 documents a bug fix that adds TypeScript type exports. Specifically, it updates package.json so that the `exports` map includes a `types` entry pointing to `./index.d.ts`.
v5.2.0
v5.2.0 adds new bit-scanning helpers to the Long API, specifically trailing and leading zero counters via ctz and clz aliases. The release notes also clarify that isPositive includes zero, and include several documentation updates.
Featuresv5.1.0
v5.1.0 adds a UMD fallback build so that CommonJS environments can load the library via require. The release notes only mention the UMD fallback, but the diff also includes packaging and TypeScript typing changes that can affect how consumers import the module.
Features