feross/buffer — pull request #24 by devongovett (2014-04-10 04:46:15+00:00)
Title: Fix typed array check in Safari

Unfortunately, in Safari `typeof Uint8Array` and `typeof ArrayBuffer` return `'object'` instead of `'function'`, so typed arrays were not being used there. We can check `Uint8Array.constructor` to see if its a function cross browser, but we'd also have to check for null and undefined first. I think it's easier just to try constructing one in the try..catch block that is already there.