Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 25, 2024 via pnpm

read-package-json 2.1.2

The thing npm uses to read package.json files with semantics and defaults and validation
Package summary
Share
3
issues
1
high severity
license
1
2
low severity
license
2
6
licenses
12
MIT
11
ISC
2
Apache-2.0
3
other licenses
BSD-2-Clause
1
CC-BY-3.0
1
CC0-1.0
1
Package created
11 Jun 2012
Version published
20 Aug 2020
Maintainers
5
Total deps
28
Direct deps
4
License
ISC

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
12 Packages, Including:
balanced-match@1.0.2
brace-expansion@1.1.11
concat-map@0.0.1
function-bind@1.1.2
hasown@2.0.2
is-core-module@2.13.1
json-parse-even-better-errors@2.3.1
path-is-absolute@1.0.1
path-parse@1.0.7
resolve@1.22.8
spdx-expression-parse@3.0.1
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
11 Packages, Including:
fs.realpath@1.0.0
glob@7.2.3
hosted-git-info@2.8.9
inflight@1.0.6
inherits@2.0.4
minimatch@3.1.2
npm-normalize-package-bin@1.0.1
once@1.4.0
read-package-json@2.1.2
semver@5.7.2
wrappy@1.0.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

4
All Dependencies CSV
β“˜ This is a list of read-package-json 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
glob7.2.315.08 kBISC
prod
json-parse-even-better-errors2.3.14.45 kBMIT
prod
normalize-package-data2.5.08.46 kBBSD-2-Clause
prod
1
2
npm-normalize-package-bin1.0.130.46 kBISC
prod

Visualizations

Frequently Asked Questions

What does read-package-json do?

Read-package-json is a handy npm package that brings a collection of functionalities to handle package.json files. This module is majorly used by npm and unravels package.json files with enhanced semantics, validation, and default values. Notably, it cache files that have been read to prevent reading the same file more than once. Also, it validates certain elements, and provides defaults where necessary. Furthermore, the package comes with a feature that allows you to see your project the same way npm will see it.

How do you use read-package-json?

To use the read-package-json npm package, you need to install it in your project first. Once the package is successfully installed, you can require and use it in your JavaScript file. Here's a basic usage example:

var readJson = require('read-package-json')

// readJson(filename, [logFunction=noop], [strict=false], cb)
readJson('/path/to/package.json', console.error, false, function (er, data) {
  if (er) {
    console.error("There was an error reading the file")
    return
  }

  console.error('the package data is', data)
});

The readJson function accepts four parameters: the filename (file path for the package.json file), a logging function (defaults to noop), a Boolean value (strict) to specify if SemVer 2.0 version strings and other strict requirements should be enforced, and a callback function that gets called with (er, data).

Where are the read-package-json docs?

Read-package-json's documentation and details can be found directly in the readme section of the project's GitHub repository (https://github.com/npm/read-package-json.git). The documentation includes fields and usage details alongside numerous specific functions related to this package and other pertinent information.