https://github.com/nof1000/getpkg
📦 The fastest way to get the root-level package.json as an object
https://github.com/nof1000/getpkg
fs javascript json nodejs package path system
Last synced: 5 months ago
JSON representation
📦 The fastest way to get the root-level package.json as an object
- Host: GitHub
- URL: https://github.com/nof1000/getpkg
- Owner: nof1000
- License: mit
- Created: 2017-04-15T10:26:46.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-17T10:18:28.000Z (about 9 years ago)
- Last Synced: 2025-10-21T20:08:48.772Z (8 months ago)
- Topics: fs, javascript, json, nodejs, package, path, system
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/getpkg
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## getpkg
> Just returns the root-level package.json as an object
## Install
npm:
```
$ npm install getpkg --save
```
yarn:
```
$ yarn add getpkg
```
## Example
```js
const getpkg = require('getpkg');
console.log(getpkg()); /* >>
{
name: "the-lost-package",
version: "6.18.0",
description: "4, 8, 15, 16, 23, 42",
...
}
*/
```
## LICENSE
[MIT](./LICENSE "The MIT License")