load-semver
v1.0.0
Published
Load `semver` module from either CWD or npm CLI directory
Downloads
27
Maintainers
Readme
load-semver
Load semver
module from either CWD or npm
CLI directory.
const loadSemver = require('load-semver');
(async () => {
const {parse} = await loadSemver();
const {major, minor, patch} = parse('1.25.48');
major; //=> 1
minor; //=> 25
patch; //=> 48
})();
Installation
npm install load-semver
API
const loadSemver = require('load-semver');
loadSemver()
Return: Promise<Function>
Read the document of load-from-cwd-or-npm
for the detailed loading algorithm.
License
ISC License © 2018 Shinnosuke Watanabe