MCPcopy Create free account
hub / github.com/UI5/webcomponents / checked

Function checked

packages/main/test/pages/diffable-html.js:411–419  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

409 }
410
411 function checked (length) {
412 // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
413 // length is NaN (which is otherwise coerced to zero.)
414 if (length >= K_MAX_LENGTH) {
415 throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
416 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
417 }
418 return length | 0
419 }
420
421 function SlowBuffer (length) {
422 if (+length != length) { // eslint-disable-line eqeqeq

Callers 3

allocUnsafeFunction · 0.85
fromArrayLikeFunction · 0.85
fromObjectFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…