Simply parse string like 4.5.6.7
into javascript object like { major: 4, minor: 5, patch: 6, build: 7 }
.
$ npm install --save parse-version
var parseVersion = require('parse-version');
var version = parseVersion('2.5.6.7'); // { major: 2, minor: 5, patch: 6, build: 7 }
MIT © Aloïs Deniel