MCPcopy Index your code
hub / github.com/feross/buffer / typedArraySupport

Function typedArraySupport

index.js:49–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49function typedArraySupport () {
50 // Can typed array instances can be augmented?
51 try {
52 const arr = new Uint8Array(1)
53 const proto = { foo: function () { return 42 } }
54 Object.setPrototypeOf(proto, Uint8Array.prototype)
55 Object.setPrototypeOf(arr, proto)
56 return arr.foo() === 42
57 } catch (e) {
58 return false
59 }
60}
61
62Object.defineProperty(Buffer.prototype, 'parent', {
63 enumerable: true,

Callers 1

index.jsFile · 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…