MCPcopy
hub / github.com/oklai/koala / getVersionNum

Function getVersionNum

src/app/scripts/util.js:175–193  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

173 }
174
175 function getVersionNum(version) {
176 var versionInfo = version.split('-beta'),
177 betaNum = versionInfo[1],
178 numList = versionInfo[0].split('.'),
179 stableNum = 0,
180 multiple = 100;
181
182 for (var i = 0;i < 3; i++) {
183 if (numList[i] !== undefined) {
184 stableNum += numList[i] * multiple;
185 multiple = multiple / 10;
186 }
187 }
188
189 return {
190 stable: stableNum,
191 beta: betaNum
192 };
193 }
194};
195
196/**

Callers 1

versionDetectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected