mozilla-toolkit-versioning
v1.0.0
Published
Parser for Mozilla's toolkit version format
Downloads
1,852
Readme
mozilla-toolkit-versioning
A node library to parse simple node-semver-ish strings to generate a min and max version of Mozilla platform support using Mozilla's toolkit version format. For comparing versions, check out mozilla-version-comparator.
API
mozVersion.parse(s)
var mozVersion = require('mozilla-toolkit-versioning');
var parsed = mozVersion.parse('>=3.6 <= 30.0');
parsed.min; // '3.6'
parsed.max; // '30.0'
var parsed = mozVersion.parse('>26');
parsed.min; // '26.1'
parsed.max; // undefined
Ranges
1.2.3
- A specific version>1.2.3
- Greater than a specific version<1.2.3
- Less than a specific version (does not include pre-release)>=1.2.3
- Greater than or equal to a specific version (does not include pre-release)<=1.2.3
- Less than a specific version (DOES include pre-release)>=1.2.3 <=2.3.4
- Between or equal to the range1.2.3 - 2.3.4
:=>=1.2.3 <=2.3.4
License
MPL 2.0 License, copyright (c) 2014 Jordan Santell