npm-latest-versions
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

npm-latest-version

Check npm latest versions

Type definition

export interface Options {
    registry?: string;
    module: string;
    since?: Date;
}
export interface Result {
    [distTag: string]: {
        version: string;
        time: Date;
    };
}
export default function npmLatestVersions(options: Options): Promise<Result>

Usage

import npmLatestVersions from 'npm-latest-versions'

(async () => {
  const versions = await npmLatestVersions({
    module: 'express',
    since: new Date('2019/01/01')
  })
  // => { latest: { version: '4.17.1', time: '2019-05-26T04:25:34.606Z' } }
})()

Readme

Keywords

Package Sidebar

Install

npm i npm-latest-versions

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

10.7 kB

Total Files

7

Last publish

Collaborators

  • banyudu