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

Method insert

lib/script/stack.js:247–257  ·  view source on GitHub ↗

* Insert an item. * @param {Number} index * @param {Buffer} item * @returns {Buffer}

(index, item)

Source from the content-addressed store, hash-verified

245 */
246
247 insert(index, item) {
248 if (index < 0)
249 index += this.items.length;
250
251 assert(Buffer.isBuffer(item));
252 assert(index >= 0 && index <= this.items.length);
253
254 this.items.splice(index, 0, item);
255
256 return this;
257 }
258
259 /**
260 * Erase stack items.

Callers 5

insertDataMethod · 0.95
insertStringMethod · 0.95
insertNumMethod · 0.95
insertIntMethod · 0.95
insertBoolMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected