From: Feross Aboukhadijeh Date: Sat, 28 Dec 2013 20:57:52 +0000 (-0800) Subject: add chrome 9-10 support X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=8906114bb05fbd94b8053b440022b77cfde1fa28;p=buffer.git add chrome 9-10 support --- diff --git a/index.js b/index.js index 46d0f97..fa98b98 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,8 @@ var browserSupport = (function () { try { var arr = new Uint8Array(0) arr.foo = function () { return 42 } - return 42 === arr.foo() + return 42 === arr.foo() && + typeof arr.subarray === 'function' // Chrome 9-10 lack `subarray` } catch (e) { return false }