MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / checked

Function checked

lib/models/dav.js:2177–2185  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

2175}
2176
2177function 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}
2186Buffer.isBuffer = isBuffer;
2187function internalIsBuffer (b) {
2188 return !!(b != null && b._isBuffer)

Callers 3

allocUnsafeFunction · 0.85
fromArrayLikeFunction · 0.85
fromObjectFunction · 0.85

Calls 1

kMaxLengthFunction · 0.85

Tested by

no test coverage detected