Gathering detailed insights and metrics for @dword-design/load-pkg
Gathering detailed insights and metrics for @dword-design/load-pkg
Gathering detailed insights and metrics for @dword-design/load-pkg
Gathering detailed insights and metrics for @dword-design/load-pkg
Load the package.json in the base of the user's current project.
npm install @dword-design/load-pkg
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
11 Stars
37 Commits
2 Forks
5 Watchers
1 Branches
2 Contributors
Updated on Jan 11, 2024
Latest Version
4.0.0
Package Id
@dword-design/load-pkg@4.0.0
Unpacked Size
8.32 kB
Size
3.16 kB
File Count
4
NPM Version
8.19.3
Node Version
16.19.0
Published on
Jan 15, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
2
Loads package.json, by finding the first directory with a package.json, recursing up, starting with the given directory.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
1$ npm install --save load-pkg
By default, if no callback is passed a promise is returned.
The following examples assume the code is inside an async
function:
1const load = require('load-pkg'); 2 3// get the package.json from the cwd 4const pkg = await load(); 5 6// specify the starting directory to search from 7const pkg = await load('foo/bar');
1const load = require('load-pkg'); 2 3// get the package.json from the cwd 4load((err, pkg) => { 5 console.log(pkg); 6}); 7 8// specify the starting directory to search from 9load('foo/bar', (err, pkg) => { 10 console.log(pkg); 11});
Loads the package.json in process.cwd()
by default:
1const load = require('load-pkg'); 2 3// the following are equivalent 4const pkg = load.sync(process.cwd()); 5const pkg = load.sync();
Specify a cwd or filepath to start from:
1const pkg = require('load-pkg').sync('a/b/c');
Breaking changes
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
Jon Schlinkert
Copyright © 2018, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on June 27, 2018.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2025-07-07
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