MCPcopy
hub / github.com/bcoin-org/bcoin / fromInt

Method fromInt

lib/script/stack.js:539–548  ·  view source on GitHub ↗
(int)

Source from the content-addressed store, hash-verified

537 }
538
539 static fromInt(int) {
540 assert(typeof int === 'number');
541
542 if (int >= -1 && int <= 16)
543 return common.small[int + 1];
544
545 const num = ScriptNum.fromNumber(int);
546
547 return Stack.fromNum(num);
548 }
549
550 static toBool(item) {
551 assert(Buffer.isBuffer(item));

Callers 15

setIntMethod · 0.45
pushIntMethod · 0.45
unshiftIntMethod · 0.45
insertIntMethod · 0.45
setIntMethod · 0.45
pushIntMethod · 0.45
unshiftIntMethod · 0.45
insertIntMethod · 0.45
fromBoolMethod · 0.45
mineCSVFunction · 0.45
node-test.jsFile · 0.45
mineCSVFunction · 0.45

Calls 1

fromNumMethod · 0.45

Tested by

no test coverage detected