type-check
npmv0.4.0type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.
Not recommended for new projects
No — type-check should not be adopted for new projects. Last published 2351 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 2351 days ago.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 57 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-check 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.
Licenses in the dependency tree
Every license you inherit by installing type-check, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >= 0.8.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the type-check README.
// Basic types:
var typeCheck = require('type-check').typeCheck;
typeCheck('Number', 1); // true
typeCheck('Number', 'str'); // false
typeCheck('Error', new Error); // true
typeCheck('Undefined', undefined); // true
// Comment
typeCheck('count::Number', 1); // true
// One type OR another type:
typeCheck('Number | String', 2); // true
typeCheck('Number | String', 'str'); // true
type-check 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-checkthis page | 0 | 2 | MIT | 6 years ago |
| type-is | 130.9M | 3 | MIT | 1 day ago |
| is-plain-obj | 112.9M | 1 | MIT | 1 day ago |
| is-generator-fn | 0 | 1 | MIT | 1 day ago |
| zod | 246.7M | 13 | MIT | 1 day ago |
| has-flag | 166.9M | 1 | MIT | 1 day ago |
Dependencies
Declared by type-check v0.4.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (3)
Used by
Popular packages that depend on type-check.
Relationship graph
Dependencies (left) and dependents (right) of type-check.
Frequently installed together
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
Wrap words to a specified length.
node's assert.deepEqual algorithm except for NaN being equal to NaN
Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible
Efficient implementation of Levenshtein algorithm with locale-specific collator support.
Release history
No releases in the last two years, typically about 160 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.4.0latest | 6 years ago | 21 KB | MIT |
| 0.3.2 | 10 years ago | — | MIT |
| 0.3.1 | 12 years ago | — | MIT |
| 0.3.0 | 13 years ago | — | MIT |
| 0.2.0 | 13 years ago | — | MIT |
| 0.1.0 | 13 years ago | — | MIT |
Overview
type-check is an npm package that type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax. It has 2 known dependents in the graph. The latest version is 0.4.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax and value a focused 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
- 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
Frequently asked questions
Should I use type-check?
No — type-check should not be adopted for new projects. Last published 2351 days ago.
How do I install type-check?
Run `npm install type-check` to add type-check to your npm project.
How many dependencies does type-check have?
type-check declares 4 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 57 KB on disk.
What license is type-check released under?
type-check is distributed under the MIT license.
How popular is type-check?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on type-check.
Is type-check still maintained?
The most recent release of type-check (v0.4.0) was published 6 years ago.
Does type-check run install scripts?
No. type-check does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.