* Set stack item at index. * @param {Number} index * @param {Buffer} value * @returns {Buffer}
(index, item)
| 200 | */ |
| 201 | |
| 202 | set(index, item) { |
| 203 | if (index < 0) |
| 204 | index += this.items.length; |
| 205 | |
| 206 | assert(Buffer.isBuffer(item)); |
| 207 | assert(index >= 0 && index <= this.items.length); |
| 208 | |
| 209 | this.items[index] = item; |
| 210 | |
| 211 | return this; |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | * Push item onto stack. |
no outgoing calls
no test coverage detected