type-detect
npmv4.1.0Improved 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.
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 >=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.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| type-detectthis page | 44.3M | 1 | MIT | 2 years ago |
| mime-db | 0 | 2 | MIT | 1 day ago |
| type-fest | 337.8M | 6 | (MIT OR CC0-1.0) | 1 day ago |
| zod | 246.7M | 13 | MIT | 1 day ago |
| mime-types | 185.3M | 9 | MIT | 1 day ago |
| csstype | 142.8M | 2 | MIT | 1 day ago |
Dependencies
Declared by type-detect v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (34)
Used by
Popular packages that depend on type-detect.
Relationship graph
Dependencies (left) and dependents (right) of type-detect.
Frequently installed together
Release history
No releases in the last two years, typically about 67 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.1.0latest | 2 years ago | 38 KB | MIT |
| 4.0.8 | 8 years ago | — | MIT |
| 4.0.7 | 8 years ago | — | MIT |
| 4.0.6 | 8 years ago | — | MIT |
| 4.0.5 | 8 years ago | — | MIT |
| 4.0.3 | 9 years ago | — | MIT |
| 4.0.2 | 9 years ago | — | MIT |
| 4.0.1 | 9 years ago | — | MIT |
| 4.0.0 | 10 years ago | — | MIT |
| 3.0.0 | 10 years ago | — | MIT |
| 2.0.2 | 10 years ago | — | MIT |
| 2.0.1 | 10 years ago | — | MIT |
| 2.0.0 | 10 years ago | — | MIT |
| 1.0.0 | 11 years ago | — | MIT |
| 0.1.2 | 12 years ago | — | MIT |
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
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.