0.1.1 • Published 4 years ago

parse-semver-string v0.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

parse-semver-string

NPM version Build Status NPM downloads

Features

Parse semver string to an object that contains name version and path

Installation

$ npm i --save parse-semver-string

Usage

const parse = require('parse-semver-string');

parse('@scope/name@version/path/to/file');

===>

{
  name: '@scope/name',
  version: 'version',
  path: 'path/to/file'
}


parse('name/path/to/file')

===>


{
  name: 'name',
  version: '',
  path: 'path/to/file'
}