tarn
npmv3.1.2TypeScriptSimple and robust resource pool for node.js
Safe to adopt
Yes — tarn scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 63 days ago. 3 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 63 days ago. 3 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 42 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 4 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 tarn 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
- node >=8.0.0
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the tarn README.
const { Pool, TimeoutError } = require('tarn');
const pool = new Pool({
// Function that creates a resource. You can either pass the resource
// to the callback(error, resource) or return a promise that resolves the resource
// (but not both) Callback syntax will be deprecated at some point.
create: cb => {
cb(null, new SomeResource());
},
// Validates a connection before it is used. Return true or false
// from it. If false is returned, the resource is destroyed and
// another one is acquired. Should return a Promise if validate is
// an async function.tarn 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 |
|---|---|---|---|---|
| tarnthis page | 0 | 2 | MIT | 2 months ago |
| p-limit | 293.1M | 5 | MIT | 1 day ago |
| pg-pool | 43.5M | 1 | MIT | 1 day ago |
| lodash.throttle | 0 | 2 | MIT | 1 day ago |
| throat | 0 | 2 | MIT | 1 day ago |
Dependencies
Declared by tarn v3.1.2. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (12)
Used by
Popular packages that depend on tarn.
Relationship graph
Dependencies (left) and dependents (right) of tarn.
Frequently installed together
Prettier is an opinionated code formatter
PostgreSQL client - pure javascript & libpq with the same API
fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS
The fastest and simplest library for SQLite in Node.js.
TypeScript definitions for node
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
The semantic version parser used by npm.
An extremely fast JavaScript and CSS bundler and minifier.
Runtime agnostic JS utils
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
TypeScript definitions for pg
Universal filesystem path utils
Release history
3 releases in the last two years, typically about 12 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.1.2latest | 2 months ago | 42 KB | MIT |
| 3.1.1 | 2 months ago | 42 KB | MIT |
| 3.1.0 | 2 months ago | 42 KB | MIT |
| 3.0.2 | 4 years ago | 41 KB | MIT |
| 3.0.1 | 5 years ago | 39 KB | MIT |
| 3.0.0 | 6 years ago | 39 KB | MIT |
| 2.0.0 | 7 years ago | 33 KB | MIT |
| 1.1.5 | 7 years ago | 26 KB | MIT |
| 1.1.4 | 8 years ago | 18 KB | MIT |
| 1.1.3 | 8 years ago | 18 KB | MIT |
| 1.1.2 | 8 years ago | — | MIT |
| 1.1.1 | 8 years ago | — | MIT |
| 1.1.0 | 8 years ago | — | MIT |
| 1.0.0 | 8 years ago | — | MIT |
| 0.1.5 | 10 years ago | — | MIT |
Overview
tarn is an npm package that simple and robust resource pool for node.js. It has 2 known dependents in the graph. The latest version is 3.1.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need simple and robust resource pool for node.js and value a focused 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
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use tarn?
Yes — tarn scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 63 days ago. 3 releases in the last 2 years.
How do I install tarn?
Run `npm install tarn` to add tarn to your npm project.
What license is tarn released under?
tarn is distributed under the MIT license.
How popular is tarn?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on tarn.
Is tarn still maintained?
The most recent release of tarn (v3.1.2) was published 2 months ago.
Does tarn run install scripts?
No. tarn does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.