3febf8e26c
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.circleci | ||
.github | ||
src | ||
tests | ||
.gitignore | ||
.npmignore | ||
.npmrc | ||
.prettierignore | ||
.prettierrc | ||
LICENSE.txt | ||
README.md | ||
package.json | ||
yarn.lock |
README.md
addons-moz-compare
A JavaScript library to compare Mozilla add-on versions that follow the Manifest Version Format.
API
This library exposes a mozCompare()
function that takes two (string) versions A
and B
and returns:
-1
ifA < B
0
ifA == B
1
ifA > B
This implementation matches the Firefox implementation except that there are only 3 different possible return values (Firefox returns strictly negative and strictly positive values instead of -1
and 1
).
Usage
npm i addons-moz-compare
or
yarn add addons-moz-compare
Node
const { mozCompare } = require('addons-moz-compare');
Browser
Use window.mozCompare
after having included the source of this library.
License
This plugin is released under the Mozilla Public License Version 2.0. See the bundled LICENSE file for details.