varint
npmv6.0.0protobuf-style varint bytes - use msb to create integer values of varying sizes
Not recommended for new projects
No — varint should not be adopted for new projects. Last published 2172 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 2172 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 9.4 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — 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 varint 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
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the varint README.
var varint = require('varint')
var bytes = varint.encode(300) // === [0xAC, 0x02]
varint.decode(bytes) // 300
varint.decode.bytes // 2 (the last decode() call required 2 bytes)varint 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 |
|---|---|---|---|---|
| varintthis page | 0 | 1 | MIT | 6 years ago |
| html-escaper | 79.8M | 1 | MIT | 1 day ago |
| query-string | 22.1M | 3 | MIT | 1 day ago |
| @nodable/entities | 0 | 2 | MIT | 1 day ago |
| encodeurl | 133.6M | 5 | MIT | 1 day ago |
| decode-uri-component | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by varint v6.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (1)
Used by
Popular packages that depend on varint.
Relationship graph
Dependencies (left) and dependents (right) of varint.
Frequently installed together
JavaScript parser and stringifier for YAML
Generates and consumes source maps
Reactive Extensions for modern JavaScript
TypeScript execution environment and REPL for node.js, with source map support
Delightful JavaScript Testing.
Immutable Data Collections
TypeScript definitions for yargs
yargs the modern, pirate-themed, successor to optimist.
TypeScript definitions for node
Let’s get serious about color
Run a subprocess synchronously and interactively in Node.js
tar for node
Release history
No releases in the last two years, typically about 103 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 6.0.0latest | 6 years ago | 9.4 KB | MIT |
| 5.0.2 | 6 years ago | 8.8 KB | MIT |
| 5.0.1 | 6 years ago | 9.4 KB | MIT |
| 5.0.0 | 9 years ago | — | MIT |
| 4.0.1 | 10 years ago | — | MIT |
| 4.0.0 | 11 years ago | — | MIT |
| 3.0.1 | 12 years ago | — | MIT |
| 3.0.0 | 12 years ago | — | MIT |
| 2.0.0 | 12 years ago | — | MIT |
| 1.2.0 | 12 years ago | — | MIT |
| 1.1.0 | 12 years ago | — | MIT |
| 1.0.0 | 13 years ago | — | MIT |
| 0.0.3 | 13 years ago | — | MIT |
| 0.0.2 | 13 years ago | — | MIT |
| 0.0.1 | 13 years ago | — | MIT |
Overview
varint is an npm package that protobuf-style varint bytes - use msb to create integer values of varying sizes. It has 1 known dependents in the graph. The latest version is 6.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need protobuf-style varint bytes - use msb to create integer values of varying sizes and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (1 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use varint?
No — varint should not be adopted for new projects. Last published 2172 days ago.
How do I install varint?
Run `npm install varint` to add varint to your npm project.
What license is varint released under?
varint is distributed under the MIT license.
How popular is varint?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on varint.
Is varint still maintained?
The most recent release of varint (v6.0.0) was published 6 years ago.
Does varint run install scripts?
No. varint does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.