MCPcopy Index your code
hub / github.com/UI5/webcomponents / assertSize

Function assertSize

packages/main/test/pages/diffable-html.js:276–282  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

274 Buffer.__proto__ = Uint8Array
275
276 function assertSize (size) {
277 if (typeof size !== 'number') {
278 throw new TypeError('"size" argument must be of type number')
279 } else if (size < 0) {
280 throw new RangeError('"size" argument must not be negative')
281 }
282 }
283
284 function alloc (size, fill, encoding) {
285 assertSize(size)

Callers 2

allocFunction · 0.85
allocUnsafeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected