Add production dependencies
This commit is contained in:
parent
5a0114f3e2
commit
579ccdc29f
12113 changed files with 978046 additions and 3 deletions
20
node_modules/parse-node-version/index.js
generated
vendored
Normal file
20
node_modules/parse-node-version/index.js
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
function parseNodeVersion(version) {
|
||||
var match = version.match(/^v(\d{1,2})\.(\d{1,2})\.(\d{1,2})(?:-([0-9A-Za-z-.]+))?(?:\+([0-9A-Za-z-.]+))?$/); // eslint-disable-line max-len
|
||||
if (!match) {
|
||||
throw new Error('Unable to parse: ' + version);
|
||||
}
|
||||
|
||||
var res = {
|
||||
major: parseInt(match[1], 10),
|
||||
minor: parseInt(match[2], 10),
|
||||
patch: parseInt(match[3], 10),
|
||||
pre: match[4] || '',
|
||||
build: match[5] || '',
|
||||
};
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
module.exports = parseNodeVersion;
|
Loading…
Add table
Add a link
Reference in a new issue