@magic/semver

@magic/semver

parse/serialize semantic version strings.

getting started

be in a nodejs project.

install

npm i --save-dev @magic/semver

usage

import semver from '@magic/semver'// -alpha.0 is optional.const version = '0.0.1-alpha.0'const parsed = semver.parse(version)// parsed === { major: 0, minor: 0, patch: 1, demo: { string: 'alpha', version: 0 } }const serialized = semver.serialize(parsed)// version === serialized

source

the source for this page is in the example directory and gets built and published to github using @magic/core