()
| 166 | } |
| 167 | |
| 168 | function typedArraySupport () { |
| 169 | // Can typed array instances can be augmented? |
| 170 | try { |
| 171 | var arr = new Uint8Array(1) |
| 172 | arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} |
| 173 | return arr.foo() === 42 |
| 174 | } catch (e) { |
| 175 | return false |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | Object.defineProperty(Buffer.prototype, 'parent', { |
| 180 | get: function () { |