1.0.0 • Published 6 years ago

load-semver v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

load-semver

npm version Build Status

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

Use npm.

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