Utility function to load nyc configuration
Installations
npm install @istanbuljs/load-nyc-config
Releases
Unable to fetch releases
Developer
istanbuljs
Developer Guide
Module System
CommonJS
Min. Node Version
>=8
Typescript Support
No
Node Version
14.3.0
NPM Version
6.14.5
Statistics
2 Stars
32 Commits
7 Forks
6 Watching
2 Branches
3 Contributors
Updated on 11 Dec 2023
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
3,479,703,547
Last day
-8.7%
4,338,881
Compared to previous day
Last week
-1.2%
24,606,597
Compared to previous week
Last month
8.2%
105,492,663
Compared to previous month
Last year
14.3%
1,129,745,413
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
5
Dev Dependencies
4
@istanbuljs/load-nyc-config
The utility function which NYC uses to load configuration. This can be used by outside programs to calculate the configuration. Command-line arguments are not considered by this function.
1const {loadNycConfig} = require('@istanbuljs/load-nyc-config'); 2 3(async () { 4 console.log(await loadNycConfig()); 5})();
loadNycConfig([options])
options.cwd
Type: string
Default: cwd
from parent nyc process or process.cwd()
options.nycrcPath
Type: string
Default: undefined
Name of the file containing nyc configuration.
This can be a relative or absolute path.
Relative paths can exist at options.cwd
or any parent directory.
If an nycrc is specified but cannot be found an exception is thrown.
If no nycrc option is provided the default priority of config files are:
- .nycrc
- .nycrc.json
- .nycrc.yml
- .nycrc.yaml
- nyc.config.js
- nyc.config.cjs
- nyc.config.mjs
Configuration merging
Configuration is first loaded from package.json
if found, this serves as the package
defaults. These options can be overridden by an nycrc if found. Arrays are not merged,
so if package.json
sets "require": ["@babel/register"]
and .nycrc
sets "require": ["esm"]
the effective require setting will only include "esm"
.
isLoading
1const {isLoading} = require('@istanbuljs/load-nyc-config'); 2 3console.log(isLoading());
In some cases source transformation hooks can get installed before the configuration is loaded. This allows hooks to ignore source loads that occur during configuration load.
@istanbuljs/load-nyc-config
for enterprise
Available as part of the Tidelift Subscription.
The maintainers of @istanbuljs/load-nyc-config
and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: ISC License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/istanbuljs/.github/SECURITY.md:1
- Info: Found linked content: github.com/istanbuljs/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/istanbuljs/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/istanbuljs/.github/SECURITY.md:1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 10 are checked with a SAST tool
Score
3.9
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More