MCPcopy Index your code
hub / github.com/SocketCluster/socketcluster / assertSize

Function assertSize

app/public/socketcluster-client.js:2798–2804  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

2796Buffer.__proto__ = Uint8Array
2797
2798function assertSize (size) {
2799 if (typeof size !== 'number') {
2800 throw new TypeError('"size" argument must be of type number')
2801 } else if (size < 0) {
2802 throw new RangeError('The value "' + size + '" is invalid for option "size"')
2803 }
2804}
2805
2806function alloc (size, fill, encoding) {
2807 assertSize(size)

Callers 2

allocFunction · 0.85
allocUnsafeFunction · 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…