MCPcopy
hub / github.com/jasongin/nvs / getBinaryNameFromVersion

Method getBinaryNameFromVersion

lib/version.js:256–264  ·  view source on GitHub ↗

* Get the binary name to be used based on version passed. * 'node' for version 0.X or 4.X and above * 'iojs' for version 1.X, 2.X and 3.X

(semanticVersion)

Source from the content-addressed store, hash-verified

254 * 'iojs' for version 1.X, 2.X and 3.X
255 */
256 static getBinaryNameFromVersion(semanticVersion) {
257 if (/^1\./.test(semanticVersion) ||
258 /^2\./.test(semanticVersion) ||
259 /^3\./.test(semanticVersion)) {
260 return 'iojs';
261 } else {
262 return 'node';
263 }
264 }
265
266 /**
267 * Tests if a partial version (filter) matches a specific version.

Callers 3

nodeReleaseInfoToVersionFunction · 0.80
getVersionBinaryFunction · 0.80
versionTests.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected