()
| 68 | console.error('This browser lacks typed array (Uint8Array) support which is required by ' + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'); |
| 69 | } |
| 70 | function typedArraySupport() { |
| 71 | // Can typed array instances can be augmented? |
| 72 | try { |
| 73 | var arr = new Uint8Array(1); |
| 74 | var proto = { |
| 75 | foo: function foo() { |
| 76 | return 42; |
| 77 | } |
| 78 | }; |
| 79 | Object.setPrototypeOf(proto, Uint8Array.prototype); |
| 80 | Object.setPrototypeOf(arr, proto); |
| 81 | return arr.foo() === 42; |
| 82 | } catch (e) { |
| 83 | return false; |
| 84 | } |
| 85 | } |
| 86 | Object.defineProperty(Buffer.prototype, 'parent', { |
| 87 | enumerable: true, |
| 88 | get: function get() { |
no outgoing calls
no test coverage detected
searching dependent graphs…