</>PackageGraphPackageGraph

type-detect

npmv4.1.0

Improved typeof detection for node.js and the browser.

Adopt with care

type-detect is usable, with caveats. Last published 776 days ago.

  • AAdoption: grade A, Excellent.

    44.3M downloads per week and 1 known dependents.

  • DMaintenance: grade D, Poor — a real concern.

    Last published 776 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 38 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • 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-detect 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.

38 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 >=4
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the type-detect README.

import type from 'https://deno.land/x/type_detect@v4.1.0/index.ts'

type-detect 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-detectthis page44.3M1MIT2 years ago
mime-db02MIT1 day ago
type-fest337.8M6(MIT OR CC0-1.0)1 day ago
zod246.7M13MIT1 day ago
mime-types185.3M9MIT1 day ago
csstype142.8M2MIT1 day ago

Dependencies

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

Dev (34)

@commitlint/cli ^13.1.0@rollup/plugin-buble ^0.21.3@rollup/plugin-commonjs ^20.0.0@rollup/plugin-node-resolve ^13.0.5@typescript-eslint/eslint-plugin ^4.31.2@typescript-eslint/parser ^4.31.2benchmark ^2.1.4buble ^0.20.0codecov ^3.8.3commitlint-config-angular ^13.1.0cross-env ^7.0.3eslint ^7.32.0eslint-config-strict ^14.0.1eslint-plugin-filenames ^1.3.2husky ^7.0.2karma ^6.3.4karma-chrome-launcher ^3.1.0karma-coverage ^2.0.3karma-detect-browsers ^2.3.3karma-edge-launcher ^0.4.2karma-firefox-launcher ^2.1.1karma-ie-launcher ^1.0.0karma-mocha ^2.0.1karma-opera-launcher ^1.0.0karma-safari-launcher ^1.0.0karma-safaritechpreview-launcher ^2.0.2karma-sauce-launcher ^4.3.6mocha ^9.1.1nyc ^15.1.0rollup ^2.57.0rollup-plugin-istanbul ^3.0.0semantic-release ^18.0.0simple-assert ^1.0.0typescript ^4.4.3

Used by

Popular packages that depend on type-detect.

Relationship graph

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

@sinonjs/commonstype-detect
type-detect dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 67 days apart.

Recent versions of type-detect
VersionPublishedSizeLicense
4.1.0latest2 years ago38 KBMIT
4.0.88 years agoMIT
4.0.78 years agoMIT
4.0.68 years agoMIT
4.0.58 years agoMIT
4.0.39 years agoMIT
4.0.29 years agoMIT
4.0.19 years agoMIT
4.0.010 years agoMIT
3.0.010 years agoMIT
2.0.210 years agoMIT
2.0.110 years agoMIT
2.0.010 years agoMIT
1.0.011 years agoMIT
0.1.212 years agoMIT

Overview

type-detect is an npm package that improved typeof detection for node.js and the browser. It is extremely widely used, with about 44.3M downloads per week and 1 known dependents in the graph. The latest version is 4.1.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need improved typeof detection for node.js and the browser and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to minimize your dependency tree, 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 (44.3M weekly downloads).
  • Clear open-source license (MIT).

Cons

  • Large dependency tree (34 direct dependencies) increases install size and audit surface.
  • No bundled TypeScript types (may require a separate @types package).

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

Maintainers

Keywords

Frequently asked questions

Should I use type-detect?

type-detect is usable, with caveats. Last published 776 days ago.

How do I install type-detect?

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

What license is type-detect released under?

type-detect is distributed under the MIT license.

How popular is type-detect?

type-detect has approximately 44,348,331 downloads per week and 1 known dependent packages.

Is type-detect still maintained?

The most recent release of type-detect (v4.1.0) was published 2 years ago.

Does type-detect run install scripts?

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