(length)
| 2175 | } |
| 2176 | |
| 2177 | function checked (length) { |
| 2178 | // Note: cannot use `length < kMaxLength()` here because that fails when |
| 2179 | // length is NaN (which is otherwise coerced to zero.) |
| 2180 | if (length >= kMaxLength()) { |
| 2181 | throw new RangeError('Attempt to allocate Buffer larger than maximum ' + |
| 2182 | 'size: 0x' + kMaxLength().toString(16) + ' bytes') |
| 2183 | } |
| 2184 | return length | 0 |
| 2185 | } |
| 2186 | Buffer.isBuffer = isBuffer; |
| 2187 | function internalIsBuffer (b) { |
| 2188 | return !!(b != null && b._isBuffer) |
no test coverage detected