Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 7, 2024 via pnpm

read-pkg 3.0.0

Read a package.json file
Package summary
Share
3
issues
1
high severity
license
1
2
low severity
license
2
6
licenses
16
MIT
3
ISC
2
Apache-2.0
3
other licenses
BSD-2-Clause
1
CC-BY-3.0
1
CC0-1.0
1
Package created
2 Sep 2015
Version published
4 Nov 2017
Maintainers
1
Total deps
24
Direct deps
3
License
MIT

Issues

3

1 high severity issue

high
Recommendation: Read and validate the license terms
via: normalize-package-data@2.5.0
Collapse
Expand

2 low severity issues

low
Recommendation: Read and validate the license terms
via: normalize-package-data@2.5.0
Recommendation: Read and validate the license terms
via: normalize-package-data@2.5.0
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
16 Packages, Including:
error-ex@1.3.2
function-bind@1.1.2
hasown@2.0.2
is-arrayish@0.2.1
is-core-module@2.13.1
json-parse-better-errors@1.0.2
load-json-file@4.0.0
parse-json@4.0.0
path-parse@1.0.7
path-type@3.0.0
pify@3.0.0
read-pkg@3.0.0
resolve@1.22.8
spdx-expression-parse@3.0.1
strip-bom@3.0.0
supports-preserve-symlinks-flag@1.0.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
graceful-fs@4.2.11
hosted-git-info@2.8.9
semver@5.7.2

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
2 Packages, Including:
spdx-correct@3.2.0
validate-npm-package-license@3.0.4

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
normalize-package-data@2.5.0

Creative Commons Attribution 3.0 Unported

Uncategorized
Not OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
spdx-exceptions@2.5.0

Creative Commons Zero v1.0 Universal

Public Domain
Not OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
spdx-license-ids@3.0.17
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of read-pkg 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
load-json-file4.0.01.69 kBMIT
prod
normalize-package-data2.5.08.46 kBBSD-2-Clause
prod
1
2
path-type3.0.01.72 kBMIT
prod

Visualizations

Frequently Asked Questions

What does read-pkg do?

The read-pkg module provides a convenient way to read a package.json file in JavaScript. It throws helpful JSON errors and normalizes the data for you. An integral step in almost all npm modules, read-pkg abstracts the process of reading and parsing a package.json file, making your projects cleaner and more efficient.

How do you use read-pkg?

To use read-pkg, first install it in your project by running npm install read-pkg in your terminal. After the installation, you can use it in your JavaScript code by importing it and using the readPackage() method to read a package.json file. The cwd option can be supplied to specify a different current working directory.

Here's a simple usage example:

import {readPackage} from 'read-pkg';

console.log(await readPackage());
//=> {name: 'read-pkg', …}

console.log(await readPackage({cwd: 'some-other-directory'}));
//=> {name: 'unicorn', …}

For synchronous version, you can use readPackageSync() method:

import {readPackageSync} from 'read-pkg';

console.log(readPackageSync());

Where are the read-pkg docs?

The read-pkg documentation is primarily located on its GitHub repository. Here you can find information about its API, usage examples, and other related information. Remember to check out the "options" section to understand how you can customize the behavior of read-pkg. Specifically, the normalize option can be used to normalize the package data.