MCPcopy
hub / github.com/opentrace/opentrace / humanReadableVersionToPacked

Function humanReadableVersionToPacked

ui/public/lbug_wasm_worker.js:1506–1512  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1504 var moduleRtn;
1505 (function () {
1506 function humanReadableVersionToPacked(str) {
1507 str = str.split('-')[0];
1508 var vers = str.split('.').slice(0, 3);
1509 while (vers.length < 3) vers.push('00');
1510 vers = vers.map((n, i, arr) => n.padStart(2, '0'));
1511 return vers.join('');
1512 }
1513 var packedVersionToHumanReadable = (n) =>
1514 [(n / 1e4) | 0, ((n / 100) | 0) % 100, n % 100].join('.');
1515 var TARGET_NOT_SUPPORTED = 2147483647;

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected