get-package-type
npmv0.1.0Determine the `package.json#type` which applies to a location
Not recommended for new projects
No — get-package-type should not be adopted for new projects. Last published 2304 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 2304 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 5.9 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 get-package-type 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 >=8.0.0
- Module format
- ESM only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the get-package-type README.
const getPackageType = require('get-package-type');
(async () => {
console.log(await getPackageType('file.js'));
console.log(getPackageType.sync('file.js'));
})();Dependencies
Declared by get-package-type v0.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (5)
Used by
Popular packages that depend on get-package-type.
Relationship graph
Dependencies (left) and dependents (right) of get-package-type.
Frequently installed together
Resolve the path of a module like `require.resolve()` but from a given path
The semantic version parser used by npm.
the complete solution for node.js command-line programs
Lodash modular utilities.
An AST-based pattern checker for JavaScript.
A tiny (183B to 210B) and fast utility to ascend parent directories
Prettier is an opinionated code formatter
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
[](https://github.com/mmkal/expect-type/actions/workflows/ci.yml)  [](ht
PostgreSQL client - pure javascript & libpq with the same API
TypeScript execution environment and REPL for node.js, with source map support
Functions for dealing with a PostgreSQL connection string
Release history
No releases in the last two years.
| Version | Published | Size | License |
|---|---|---|---|
| 0.1.0latest | 6 years ago | 5.9 KB | MIT |
Overview
get-package-type is an npm package that determine the `package.json#type` which applies to a location. It has 2 known dependents in the graph. The latest version is 0.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need determine the `package.json#type` which applies to a location 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 get-package-type?
No — get-package-type should not be adopted for new projects. Last published 2304 days ago.
How do I install get-package-type?
Run `npm install get-package-type` to add get-package-type to your npm project.
What license is get-package-type released under?
get-package-type is distributed under the MIT license.
How popular is get-package-type?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on get-package-type.
Is get-package-type still maintained?
The most recent release of get-package-type (v0.1.0) was published 6 years ago.
Does get-package-type run install scripts?
No. get-package-type does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.