version-selector-type
Returns the type and normalized version of a version selector

Installation
npm i -S version-selector-type
Usage
'use strict'
const getVersionSelectorType = require('version-selector-type')
console.log(getVersionSelectorType('1.0.0'))
console.log(getVersionSelectorType('^1.0.0'))
console.log(getVersionSelectorType('latest'))
console.log(getVersionSelectorType('github:zkochan/foo'))
console.log(getVersionSelectorType('1.2.0beta'))
console.log(getVersionSelectorType.strict('1.2.0beta'))
API
getVersionSelectorType(selector)
Returns the type of the version selector and the normalized form of that selector.
Returns null
in case it is an unknown selector.
Interprets versions and ranges loosely.
getVersionSelectorType.strict(selector)
Same as getVersionSelectorType()
but interprets versions and ranges not loosely.
License
MIT © Zoltan Kochan