Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/naturalintelligence/semver-split

A small and fast utility to split semver string in major minor patch version object
https://github.com/naturalintelligence/semver-split

semver split

Last synced: 17 days ago
JSON representation

A small and fast utility to split semver string in major minor patch version object

Awesome Lists containing this project

README

        

# semver-split
A small and fast utility to split semver string in major minor patch version object

```JavaScript
const split = require('semver-split');
var semver = split("1.2.5"); // { major: 1, minor: 2, patch: 5}
var semver = split("1.2.x"); // { major: 1, minor: 2, patch: 'x'}
var semver = split("1.x"); // { major: 1, minor: 'x'}
var semver = split("*"); // { major: '*'}
```