</>PackageGraphPackageGraph

tarn

npmv3.1.2TypeScript

Simple 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

42 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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.
Example truncated — see the full README.

tarn vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
tarnthis page02MIT2 months ago
p-limit293.1M5MIT1 day ago
pg-pool43.5M1MIT1 day ago
lodash.throttle02MIT1 day ago
throat02MIT1 day ago

Dependencies

Declared by tarn v3.1.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (12)

@types/node ^20@typescript-eslint/eslint-plugin ^2.21.0@typescript-eslint/parser ^2.21.0bluebird ^3.7.2eslint ^6.8.0eslint-config-prettier ^6.10.0eslint-plugin-prettier ^3.1.2husky ^1.3.1lint-staged ^9.5.0prettier ^1.19.1typescript ^5.9.3vitest ^4.1.2

Used by

Popular packages that depend on tarn.

Relationship graph

Dependencies (left) and dependents (right) of tarn.

kyselyknextarn
tarn dependencies dependents

Frequently installed together

Release history

3 releases in the last two years, typically about 12 days apart.

Recent versions of tarn
VersionPublishedSizeLicense
3.1.2latest2 months ago42 KBMIT
3.1.12 months ago42 KBMIT
3.1.02 months ago42 KBMIT
3.0.24 years ago41 KBMIT
3.0.15 years ago39 KBMIT
3.0.06 years ago39 KBMIT
2.0.07 years ago33 KBMIT
1.1.57 years ago26 KBMIT
1.1.48 years ago18 KBMIT
1.1.38 years ago18 KBMIT
1.1.28 years agoMIT
1.1.18 years agoMIT
1.1.08 years agoMIT
1.0.08 years agoMIT
0.1.510 years agoMIT

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.

Maintainers

Keywords

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.