MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / checkedAdd

Function checkedAdd

packages/plugins/apps/src/git-client/packfile.ts:59–63  ·  view source on GitHub ↗
(a: number, b: number, what: string)

Source from the content-addressed store, hash-verified

57};
58
59const checkedAdd = (a: number, b: number, what: string): number => {
60 const value = a + b;
61 if (!Number.isSafeInteger(value)) throw new PackParseError(`${what} exceeds safe integer range`);
62 return value;
63};
64
65const checkedMul = (a: number, b: number, what: string): number => {
66 const value = a * b;

Callers 4

readVarintSizeFunction · 0.85
readDeltaVarintFunction · 0.85
accountExpandedFunction · 0.85
parsePackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected