Parse, normalize and validate given semver shorthand (e.g. gulp@v3.8.10) to object.

Install
npm i parse-semver --save
npm test
API
For more use-cases see the tests
It returns object with original
version given, expanded semver range
, and version
which is valid semver version.
<shorthand>
{String} the shorthand to parse, like docks@v2.2.0
return
{Object} object with few properties
Example
var parseSemver = require('parse-semver')
parseSemver('docks@~3.4.5')
parseSemver('docks@v1.2.3')
parseSemver('docks@^2.2.2')
parseSemver('docks')
Related
- benz: Compose your control flow with absolute elegance. Support async/await, callbacks, thunks, generators,… more
- parse-git-log: Parse default
git log
style to array of objects from git repository… more - parse-github-url: Parse a github URL into an object.
- parse-git-config: Parse
.git/config
into a JavaScript object. sync or async. - vez: Middleware composition at new level. Ultimate alternative to
ware
, plugins
, koa-compose
and… more
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.
