JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10118391
  • Score
    100M100P100Q220139F
  • License MIT

Get the diff type of two semver versions: 0.0.1 0.0.2 → patch

Package Exports

  • semver-diff

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (semver-diff) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

semver-diff Build Status

Get the diff type of two semver versions: 0.0.1 0.0.2patch

Install

$ npm install --save semver-diff

Usage

var semverDiff = require('semver-diff');

semverDiff('1.1.1', '1.1.2');
//=> 'patch'

semverDiff('0.0.1', '1.0.0');
//=> 'major'

semverDiff('0.1.0', '0.1.0+foo');
//=> 'build'

semverDiff('0.0.1', '0.0.1');
//=> null

semverDiff('0.0.2', '0.0.1');
//=> null

API

semverDiff(versionA, versionB)

Returns the difference type between two semver versions, or null if they're identical or the second one is lower than the first.

Possible values: 'major', 'minor', 'patch', 'prerelease', 'build', null.

License

MIT © Sindre Sorhus