()
| 47 | } |
| 48 | |
| 49 | function 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 | |
| 62 | Object.defineProperty(Buffer.prototype, 'parent', { |
| 63 | enumerable: true, |
no outgoing calls
no test coverage detected
searching dependent graphs…