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

Method insert

lib/script/script.js:2627–2637  ·  view source on GitHub ↗
(index, op)

Source from the content-addressed store, hash-verified

2625 }
2626
2627 insert(index, op) {
2628 if (index < 0)
2629 index += this.code.length;
2630
2631 assert(Opcode.isOpcode(op));
2632 assert(index >= 0 && index <= this.code.length);
2633
2634 this.code.splice(index, 0, op);
2635
2636 return this;
2637 }
2638
2639 /*
2640 * Op

Callers 10

insertOpMethod · 0.95
insertDataMethod · 0.95
insertPushMethod · 0.95
insertStringMethod · 0.95
insertSmallMethod · 0.95
insertNumMethod · 0.95
insertIntMethod · 0.95
insertBoolMethod · 0.95
insertSymMethod · 0.95
executeMethod · 0.45

Calls 1

isOpcodeMethod · 0.80

Tested by

no test coverage detected