JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q14618F
  • License ISC

Load `semver` module from either CWD or npm CLI directory

Package Exports

  • load-semver

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (load-semver) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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