(obj)
| 552 | } |
| 553 | |
| 554 | function fromArrayLike(obj) { |
| 555 | const { length } = obj; |
| 556 | if (length <= 0) |
| 557 | return new FastBuffer(); |
| 558 | if (length < (Buffer.poolSize >>> 1)) { |
| 559 | if (length > (poolSize - poolOffset)) |
| 560 | createPool(); |
| 561 | const b = new FastBuffer(allocPool, poolOffset, length); |
| 562 | TypedArrayPrototypeSet(b, obj, 0); |
| 563 | poolOffset += length; |
| 564 | alignPool(); |
| 565 | return b; |
| 566 | } |
| 567 | return new FastBuffer(obj); |
| 568 | } |
| 569 | |
| 570 | function fromObject(obj) { |
| 571 | if (obj.length !== undefined || isAnyArrayBuffer(obj.buffer)) { |
no test coverage detected
searching dependent graphs…