</>PackageGraphPackageGraph

get-package-type

npmv0.1.0

Determine 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.

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.

5.9 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 >=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)

@cfware/lint ^1.4.3@cfware/nyc ^0.7.0if-ver ^1.1.0libtap ^0.3.0nyc ^15.0.1

Used by

Popular packages that depend on get-package-type.

Relationship graph

Dependencies (left) and dependents (right) of get-package-type.

knex@istanbuljs/load-…get-package-type
get-package-type dependencies dependents

Frequently installed together

Release history

No releases in the last two years.

Recent versions of get-package-type
VersionPublishedSizeLicense
0.1.0latest6 years ago5.9 KBMIT

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.