From: Feross Aboukhadijeh Date: Tue, 7 Jul 2015 19:49:51 +0000 (-0700) Subject: style X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=19eb545efdea52ace6f96a7d4ece08494a093d56;p=buffer.git style --- diff --git a/index.js b/index.js index 91ea5e9..1aeef58 100644 --- a/index.js +++ b/index.js @@ -45,8 +45,8 @@ Buffer.TYPED_ARRAY_SUPPORT = (function () { var arr = new Uint8Array(buf) arr.foo = function () { return 42 } arr.constructor = Foo - return arr.constructor === Foo && // constructor can be set - arr.foo() === 42 && // typed array instances can be augmented + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Foo && // constructor can be set typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) {