https://github.com/rocktimsaikia/package-outdated
Returns the outdated packages of a package.json file.
https://github.com/rocktimsaikia/package-outdated
npm-outdated npm-package outdated-dependencies outdated-packages
Last synced: 11 months ago
JSON representation
Returns the outdated packages of a package.json file.
- Host: GitHub
- URL: https://github.com/rocktimsaikia/package-outdated
- Owner: rocktimsaikia
- License: mit
- Created: 2020-10-04T13:47:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-04T19:40:00.000Z (over 5 years ago)
- Last Synced: 2025-03-18T23:49:29.132Z (12 months ago)
- Topics: npm-outdated, npm-package, outdated-dependencies, outdated-packages
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
# package-outdated  
> Returns the outdated packages of a package.json file.
## Install
```bash
npm install package-outdated
```
## Usage
```js
const readOutdated = require('package-outdated')
(async()=>{
console.log(await readOutdated());
//=> {foo: { current: '1.0.0', latest: '2.0.0' }, ...}
console.log(await readOutdated({ preservePrefix: true }));
//=> {foo: { current: '^1.0.0', latest: '2.0.0' }, ...}
})();
```
## API
### readOutdated(options?)
Returns the outdated packages of a package.json file.
#### Options
##### dir
Type: `string`
Default: `process.cwd()`
Current working directory.
##### preservePrefix
Type: `boolean`
Default: `false`
Preserves the semver `prefix(^*~)` of the current version.
## Realated
- [read-packages](https://github.com/rocktimsaikia/read-packages) - Reads dependencies of a package.json file
## Support
