Package Exports
- version-selector-type
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 (version-selector-type) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
version-selector-type
Returns the type of a version selector
Installation
npm i -S version-selector-typeUsage
'use strict'
const getVersionSelectorType = require('version-selector-type')
console.log(getVersionSelectorType('1.0.0'))
//> version
console.log(getVersionSelectorType('^1.0.0'))
//> range
console.log(getVersionSelectorType('latest'))
//> tag
console.log(getVersionSelectorType('github:zkochan/foo'))
//> nullAPI
getVersionSelectorType(selector, [loose])
Returns the type of the version selector or null in case it is an unknow selector.
Arguments
selector- string - Required.[loose]- boolean - Optional. False by default. If true, Interprets versions and ranges loosely.