paulmillr/Array.prototype.find — pull request #4 by Mithgol (2014-03-23 08:27:19+00:00)
Title: do not redefine `Array.prototype.find` if already exists

The current shim does not check if `Array.prototype.find` exists before attempting `Object.defineProperty`.

However, [MDN says](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) Firefox has `Array.prototype.find` implemented since Firefox 25.

“[ECMAScript 6 compatibility table](http://kangax.github.io/es5-compat-table/es6/)” (by kangax) says that the method `.findIndex` is also available in recent versions of Chrome (has to be enabled via “Experimental JavaScript features” flag) and in Node.js v0.11 (has to be enabled via `--harmony` flag — or `--harmony_arrays` if you need to be more specific).

Hence the patch for shim to prefer native `.find` where available.