MCPcopy Index your code
hub / github.com/plotly/plotly.js / checked

Function checked

stackgl_modules/index.js:297–304  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

295 }
296}
297function checked(length) {
298 // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
299 // length is NaN (which is otherwise coerced to zero.)
300 if (length >= K_MAX_LENGTH) {
301 throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');
302 }
303 return length | 0;
304}
305function SlowBuffer(length) {
306 if (+length != length) {
307 // eslint-disable-line eqeqeq

Callers 3

allocUnsafeFunction · 0.85
fromArrayLikeFunction · 0.85
fromObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…