From: Damjan Košir Date: Thu, 23 Jul 2015 04:33:28 +0000 (+1200) Subject: Rename the second foo into a bar X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=24c6d6a13e51c4bd86c31f04fcb0a1d2e932046f;p=buffer.git Rename the second foo into a bar --- diff --git a/index.js b/index.js index 1aeef58..81f9714 100644 --- a/index.js +++ b/index.js @@ -39,14 +39,14 @@ var rootParent = {} * get the Object implementation, which is slower but will work correctly. */ Buffer.TYPED_ARRAY_SUPPORT = (function () { - function Foo () {} + function Bar () {} try { var buf = new ArrayBuffer(0) var arr = new Uint8Array(buf) arr.foo = function () { return 42 } - arr.constructor = Foo + arr.constructor = Bar return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Foo && // constructor can be set + arr.constructor === Bar && // 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) {