MCPcopy
hub / github.com/di-sukharev/opencommit / toNumber

Function toNumber

out/cli.cjs:2361–2369  ·  view source on GitHub ↗
(value, options)

Source from the content-addressed store, hash-verified

2359 return new ErrorType(`${options.context ? options.context : "Value"} ${message}.`);
2360 }
2361 function toNumber(value, options) {
2362 if (typeof value === "bigint") {
2363 throw makeException(TypeError, "is a BigInt which cannot be converted to a number", options);
2364 }
2365 if (!options.globals) {
2366 return Number(value);
2367 }
2368 return options.globals.Number(value);
2369 }
2370 function evenRound(x5) {
2371 if (x5 > 0 && x5 % 1 === 0.5 && (x5 & 1) === 0 || x5 < 0 && x5 % 1 === -0.5 && (x5 & 1) === 1) {
2372 return censorNegativeZero(Math.floor(x5));

Calls 1

makeExceptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…