MCPcopy Index your code
hub / github.com/TruthHun/BookStack / checked

Function checked

static/word2md/mammoth.browser.js:10004–10012  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

10002}
10003
10004function checked (length) {
10005 // Note: cannot use `length < kMaxLength()` here because that fails when
10006 // length is NaN (which is otherwise coerced to zero.)
10007 if (length >= kMaxLength()) {
10008 throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
10009 'size: 0x' + kMaxLength().toString(16) + ' bytes')
10010 }
10011 return length | 0
10012}
10013
10014function SlowBuffer (length) {
10015 if (+length != length) { // eslint-disable-line eqeqeq

Callers 3

allocUnsafeFunction · 0.70
fromArrayLikeFunction · 0.70
fromObjectFunction · 0.70

Calls 1

kMaxLengthFunction · 0.70

Tested by

no test coverage detected