MCPcopy Create free account
hub / github.com/RubyLouvre/anu / checked

Function checked

test/babel.js:46009–46016  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

46007 }
46008
46009 function checked(length) {
46010 // Note: cannot use `length < kMaxLength()` here because that fails when
46011 // length is NaN (which is otherwise coerced to zero.)
46012 if (length >= kMaxLength()) {
46013 throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
46014 }
46015 return length | 0;
46016 }
46017
46018 function SlowBuffer(length) {
46019 if (+length != length) {

Callers 3

allocUnsafeFunction · 0.85
fromArrayLikeFunction · 0.85
fromObjectFunction · 0.85

Calls 1

kMaxLengthFunction · 0.85

Tested by

no test coverage detected