(length)
| 113048 | if (obj.type === "Buffer" && Array.isArray(obj.data)) return fromArrayLike(obj.data); |
| 113049 | } |
| 113050 | function checked(length) { |
| 113051 | // Note: cannot use `length < K_MAX_LENGTH` here because that fails when |
| 113052 | // length is NaN (which is otherwise coerced to zero.) |
| 113053 | if (length >= K_MAX_LENGTH) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes"); |
| 113054 | return length | 0; |
| 113055 | } |
| 113056 | function SlowBuffer(length) { |
| 113057 | if (+length != length) length = 0; |
| 113058 | return Buffer.alloc(+length); |
no test coverage detected