MCPcopy Index your code
hub / github.com/bcoin-org/bcoin / fromString

Method fromString

lib/script/stack.js:520–523  ·  view source on GitHub ↗
(str, enc)

Source from the content-addressed store, hash-verified

518 }
519
520 static fromString(str, enc) {
521 assert(typeof str === 'string');
522 return Buffer.from(str, enc || 'utf8');
523 }
524
525 static toNum(item, minimal, limit) {
526 return ScriptNum.decode(item, minimal, limit);

Callers 4

setStringMethod · 0.45
pushStringMethod · 0.45
unshiftStringMethod · 0.45
insertStringMethod · 0.45

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected