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

Function createBuffer

app/public/socketcluster-client.js:2687–2695  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

2685})
2686
2687function createBuffer (length) {
2688 if (length > K_MAX_LENGTH) {
2689 throw new RangeError('The value "' + length + '" is invalid for option "size"')
2690 }
2691 // Return an augmented `Uint8Array` instance
2692 var buf = new Uint8Array(length)
2693 buf.__proto__ = Buffer.prototype
2694 return buf
2695}
2696
2697/**
2698 * The Buffer constructor returns instances of `Uint8Array` that have their

Callers 5

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