</>PackageGraphPackageGraph

type-is

npmv2.1.0

Infer the content-type of a request.

Safe to adopt

Yes — type-is scores well across adoption, maintenance, weight, supply chain, and licensing. 130.9M downloads per week and 3 known dependents. Last published 119 days ago. 2 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    130.9M downloads per week and 3 known dependents.

  • BMaintenance: grade B, Good.

    Last published 119 days ago. 2 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Pulls in 4 transitive packages, about 297 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 5 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 type-is to a project.

3
Direct dependencies

Runtime packages this one declares itself.

4
Total installed

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

297 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

Every license you inherit by installing type-is, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >= 18
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the type-is README.

var http = require('http')
var typeis = require('type-is')

http.createServer(function (req, res) {
  var istext = typeis(req, ['text/*'])
  res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text')
})

type-is vs the alternatives

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

PackageWeekly downloadsDependentsLicenseLast release
type-isthis page130.9M3MIT3 months ago
type-check02MIT1 day ago
zod246.7M13MIT1 day ago
is-plain-obj112.9M1MIT1 day ago
type-detect44.3M1MIT1 day ago
mime-db02MIT1 day ago

Dependencies

Declared by type-is v2.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (9)

eslint 7.32.0eslint-config-standard 14.1.1eslint-plugin-import 2.31.0eslint-plugin-markdown 2.2.1eslint-plugin-node 11.1.0eslint-plugin-promise 5.2.0eslint-plugin-standard 4.1.0mocha 9.2.2nyc 15.1.0

Used by

Popular packages that depend on type-is.

Relationship graph

Dependencies (left) and dependents (right) of type-is.

Frequently installed together

Release history

2 releases in the last two years, typically about 59 days apart.

Recent versions of type-is
VersionPublishedSizeLicense
2.1.0latest3 months ago21 KBMIT
2.0.11 year ago21 KBMIT
2.0.02 years ago21 KBMIT
1.6.187 years ago18 KBMIT
1.6.177 years ago17 KBMIT
1.6.168 years ago16 KBMIT
1.6.159 years agoMIT
1.6.149 years agoMIT
1.6.1310 years agoMIT
1.6.1210 years agoMIT
1.6.1110 years agoMIT
1.6.1010 years agoMIT
1.6.911 years agoMIT
1.6.811 years agoMIT
1.6.711 years agoMIT

Overview

type-is is an npm package that infer the content-type of a request. It is extremely widely used, with about 130.9M downloads per week and 3 known dependents in the graph. The latest version is 2.1.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need infer the content-type of a request and value a battle-tested, widely-adopted 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

  • Large, well-established user base (130.9M weekly downloads).
  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use type-is?

Yes — type-is scores well across adoption, maintenance, weight, supply chain, and licensing. 130.9M downloads per week and 3 known dependents. Last published 119 days ago. 2 releases in the last 2 years.

How do I install type-is?

Run `npm install type-is` to add type-is to your npm project.

How many dependencies does type-is have?

type-is declares 12 direct dependencies and pulls in 4 packages in total once its runtime tree is resolved totalling about 297 KB on disk.

What license is type-is released under?

type-is is distributed under the MIT license.

How popular is type-is?

type-is has approximately 130,886,489 downloads per week and 3 known dependent packages.

Is type-is still maintained?

The most recent release of type-is (v2.1.0) was published 3 months ago.

Does type-is run install scripts?

No. type-is does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.