Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/naturalintelligence/semver-split
- Owner: NaturalIntelligence
- License: mit
- Created: 2018-08-14T12:18:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-14T12:23:41.000Z (over 6 years ago)
- Last Synced: 2024-05-01T11:46:41.524Z (9 months ago)
- Topics: semver, split
- Language: JavaScript
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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: '*'}
```