package-outdated
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    package-outdated build license

    Returns the outdated packages of a package.json file.

    Install

    npm install package-outdated

    Usage

    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

    Support

    Install

    npm i package-outdated

    DownloadsWeekly Downloads

    4

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    5.21 kB

    Total Files

    5

    Last publish

    Collaborators

    • rocktimsaikia