long
npmv5.3.2TypeScriptA Long class for representing a 64-bit two's-complement integer value.
Adopt with care
long is usable, with caveats. Last published 510 days ago. 5 releases in the last 2 years.
- AAdoption: grade A, Excellent.
78.6M downloads per week and 1 known dependents.
- CMaintenance: grade C, Fair — worth a look.
Last published 510 days ago. 5 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 136 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
Apache-2.0 — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding long to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the long README.
import Long from "long";
var value = new Long(0xFFFFFFFF, 0x7FFFFFFF);
console.log(value.toString());
...long vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| longthis page | 78.6M | 1 | Apache-2.0 | 1 year ago |
| node-int64 | 0 | 1 | MIT | 1 day ago |
| @xtuc/long | 0 | 3 | Apache-2.0 | 1 day ago |
| big-integer | 0 | 1 | Unlicense | 1 day ago |
| anynum | 0 | 1 | MIT | 1 day ago |
| @hapi/formula | 0 | 1 | BSD-3-Clause | 1 day ago |
Dependencies
Declared by long v5.3.2. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on long.
Relationship graph
Dependencies (left) and dependents (right) of long.
Frequently installed together
TypeScript definitions for node
Prettier is an opinionated code formatter
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
Module that helps you write generated functions in Node
🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).
Convert character encodings in pure javascript.
AWS RDS SSL certificates bundles.
sql named placeholders to unnamed compiler
Extract meaning from JS Errors
The fastest javascript implementation of a double-ended queue. Used by the official Redis, MongoDB, MariaDB & MySQL libraries for Node.js and many other libraries. Maintains compatability with deque.
Release history
5 releases in the last two years, typically about 31 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.3.2latest | 1 year ago | 136 KB | Apache-2.0 |
| 5.3.1 | 1 year ago | 136 KB | Apache-2.0 |
| 5.3.0 | 1 year ago | 121 KB | Apache-2.0 |
| 5.2.5 | 1 year ago | 116 KB | Apache-2.0 |
| 5.2.4 | 1 year ago | 116 KB | Apache-2.0 |
| 5.2.3 | 3 years ago | 116 KB | Apache-2.0 |
| 5.2.2 | 3 years ago | 116 KB | Apache-2.0 |
| 5.2.1 | 3 years ago | 116 KB | Apache-2.0 |
| 5.2.0 | 4 years ago | 116 KB | Apache-2.0 |
| 5.1.0 | 4 years ago | 112 KB | Apache-2.0 |
| 5.0.1 | 4 years ago | 70 KB | Apache-2.0 |
| 5.0.0 | 4 years ago | 70 KB | Apache-2.0 |
| 4.0.0 | 8 years ago | — | Apache-2.0 |
| 3.2.0 | 10 years ago | — | Apache-2.0 |
| 3.1.0 | 10 years ago | — | Apache-2.0 |
Overview
long is an npm package that a Long class for representing a 64-bit two's-complement integer value. It is extremely widely used, with about 78.6M downloads per week and 1 known dependents in the graph. The latest version is 5.3.2, released under the Apache-2.0 license.
Who should use it
Teams working in the npm ecosystem who need a Long class for representing a 64-bit two's-complement integer value and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (78.6M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (Apache-2.0).
- Lean dependency tree (3 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use long?
long is usable, with caveats. Last published 510 days ago. 5 releases in the last 2 years.
How do I install long?
Run `npm install long` to add long to your npm project.
What license is long released under?
long is distributed under the Apache-2.0 license.
How popular is long?
long has approximately 78,615,790 downloads per week and 1 known dependent packages.
Is long still maintained?
The most recent release of long (v5.3.2) was published 1 year ago.
Does long run install scripts?
No. long does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.