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 4, 2024 via pnpm

nyc 15.1.0

the Istanbul command line interface
Package summary
Share
2
issues
1
high severity
license
1
1
low severity
license
1
7
licenses
108
MIT
36
ISC
8
BSD-3-Clause
4
other licenses
Apache-2.0
1
CC-BY-4.0
1
BSD-2-Clause
1
(MIT OR CC0-1.0)
1
Package created
9 May 2015
Version published
1 Jun 2020
Maintainers
3
Total deps
156
Direct deps
27
License
ISC

Issues

2

1 high severity issue

high
Recommendation: Read and validate the license terms
via: istanbul-lib-instrument@4.0.3
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: istanbul-lib-instrument@4.0.3
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
108 Packages, Including:
@babel/code-frame@7.24.2
@babel/compat-data@7.24.4
@babel/core@7.24.5
@babel/generator@7.24.5
@babel/helper-compilation-targets@7.23.6
@babel/helper-environment-visitor@7.22.20
@babel/helper-function-name@7.23.0
@babel/helper-hoist-variables@7.22.5
@babel/helper-module-imports@7.24.3
@babel/helper-module-transforms@7.24.5
@babel/helper-simple-access@7.24.5
@babel/helper-split-export-declaration@7.24.5
@babel/helper-string-parser@7.24.1
@babel/helper-validator-identifier@7.24.5
@babel/helper-validator-option@7.23.5
@babel/helpers@7.24.5
@babel/highlight@7.24.5
@babel/parser@7.24.5
@babel/template@7.24.0
@babel/traverse@7.24.5
@babel/types@7.24.5
@istanbuljs/schema@0.1.3
@jridgewell/gen-mapping@0.3.5
@jridgewell/resolve-uri@3.1.2
@jridgewell/set-array@1.2.1
@jridgewell/sourcemap-codec@1.4.15
@jridgewell/trace-mapping@0.3.25
aggregate-error@3.1.0
ansi-regex@5.0.1
ansi-styles@3.2.1
ansi-styles@4.3.0
append-transform@2.0.0
archy@1.0.0
argparse@1.0.10
balanced-match@1.0.2
brace-expansion@1.1.11
browserslist@4.23.0
caching-transform@4.0.0
camelcase@5.3.1
chalk@2.4.2
clean-stack@2.2.0
color-convert@1.9.3
color-convert@2.0.1
color-name@1.1.3
color-name@1.1.4
commondir@1.0.1
concat-map@0.0.1
convert-source-map@1.9.0
convert-source-map@2.0.0
cross-spawn@7.0.3

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
36 Packages, Including:
@istanbuljs/load-nyc-config@1.1.0
cliui@6.0.0
electron-to-chromium@1.4.756
foreground-child@2.0.0
fs.realpath@1.0.0
get-caller-file@2.0.5
glob@7.2.3
graceful-fs@4.2.11
inflight@1.0.6
inherits@2.0.4
isexe@2.0.0
istanbul-lib-processinfo@2.0.3
lru-cache@5.1.1
lru-cache@6.0.0
minimatch@3.1.2
nyc@15.1.0
once@1.4.0
package-hash@4.0.0
picocolors@1.0.0
release-zalgo@1.0.0
require-main-filename@2.0.0
rimraf@3.0.2
semver@6.3.1
semver@7.6.0
set-blocking@2.0.0
signal-exit@3.0.7
spawn-wrap@2.0.0
test-exclude@6.0.0
which-module@2.0.1
which@2.0.2
wrappy@1.0.2
write-file-atomic@3.0.3
y18n@4.0.3
yallist@3.1.1
yallist@4.0.0
yargs-parser@18.1.3

BSD 3-Clause "New" or "Revised" 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
use-trademark
hold-liable
Must
include-copyright
include-license
8 Packages, Including:
istanbul-lib-coverage@3.2.2
istanbul-lib-hook@3.0.0
istanbul-lib-instrument@4.0.3
istanbul-lib-report@3.0.1
istanbul-lib-source-maps@4.0.1
istanbul-reports@3.1.7
source-map@0.6.1
sprintf-js@1.0.3

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
1 Packages, Including:
@ampproject/remapping@2.3.0

Creative Commons Attribution 4.0 International

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:
caniuse-lite@1.0.30001615

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:
esprima@4.0.1

(MIT OR CC0-1.0)

Public Domain
1 Packages, Including:
type-fest@0.8.1
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

27
All Dependencies CSV
β“˜ This is a list of nyc 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@istanbuljs/load-nyc-config1.1.04.23 kBISC
prod
@istanbuljs/schema0.1.35.3 kBMIT
prod
caching-transform4.0.04.17 kBMIT
prod
convert-source-map1.9.03.91 kBMIT
prod
decamelize1.2.01.65 kBMIT
prod
find-cache-dir3.3.23.06 kBMIT
prod
find-up4.1.03.66 kBMIT
prod
foreground-child2.0.04.11 kBISC
prod
get-package-type0.1.02.54 kBMIT
prod
glob7.2.315.08 kBISC
prod
istanbul-lib-coverage3.2.29.13 kBBSD-3-Clause
prod
istanbul-lib-hook3.0.04.75 kBBSD-3-Clause
prod
istanbul-lib-instrument4.0.314.39 kBBSD-3-Clause
prod
1
1
istanbul-lib-processinfo2.0.35.58 kBISC
prod
istanbul-lib-report3.0.110.3 kBBSD-3-Clause
prod
istanbul-lib-source-maps4.0.18.68 kBBSD-3-Clause
prod
istanbul-reports3.1.7286.94 kBBSD-3-Clause
prod
make-dir3.1.03.7 kBMIT
prod
node-preload0.2.13.89 kBMIT
prod
p-map3.0.03.26 kBMIT
prod
process-on-spawn1.0.03.23 kBMIT
prod
resolve-from5.0.02.28 kBMIT
prod
rimraf3.0.26.33 kBISC
prod
signal-exit3.0.73.76 kBISC
prod
spawn-wrap2.0.011.06 kBISC
prod
test-exclude6.0.06.75 kBISC
prod
yargs15.4.154.97 kBMIT
prod

Visualizations

Frequently Asked Questions

What does nyc do?

NYC, also known as Istanbul's state of the art command line interface, is a robust tool utilized for code coverage in JavaScript. It functions by instrumenting your JavaScript code with line counters, ascertaining the part of the code that has been executed (covered) when running tests. NYC supports applications that spawn subprocesses and provides source mapped coverage for Babel and TypeScript projects. With NYC, developers can conveniently track how much of their codebase is covered by tests, making it easier to identify areas that need further testing.

How do you use nyc?

To use NYC, you will firstly need to install it as a dev dependency in your project. This can be done by running the command npm i -D nyc or yarn add -D nyc in your terminal, which will add NYC to the dev dependencies in your package.json file.

Upon installation, NYC should be used to wrap your test command in npm scripts. Here's an example of how you can use NYC with Mocha, a popular test runner:

{
  "scripts": {
    "test": "mocha",
    "coverage": "nyc npm run test"
  }
}

To generate a coverage report, you can simply run npm run coverage. You can also use npx instead of installing NYC as a dependency.

NYC also provides sophisticated configuration options which allow you to define your specific coverage settings. For instance, if you want to set a threshold for the minimum coverage, you can add the check-coverage and statements flags as such:

{
  "all": true,
  "check-coverage": true,
  "statements": 80
}

This setup will fail the build if the statements coverage drops below 80%. For extensive guidance and tips on using and configuring NYC, please refer to the advanced docs in the project's repo.

Where are the nyc docs?

The comprehensive documentation for NYC can be found primarily in the project's GitHub repository. This includes all the details you need to make effective use of NYC, from installation, usage, example code snippets, to sophisticated configuration options and troubleshooting tips. There are also numerous tutorials and advanced NYC documentation available on the Istanbul.js website. You'll find these resources invaluable in understanding how to generate, interpret, and improve your code coverage reports using NYC. Remember to also check the npx nyc --help command for more detailed command-line instructions.