tstone/Gradient.js — pull request #3 by artemshitov (2014-05-31 13:21:02+00:00)
Title: Free `sets`

`sets` as an `Array.prototype` method screws arrays globally in the browser, causing bugs in other libraries. When you add a method this way, it appears as a property of every array, and, since an array is an object, it gets in all `console.log` and `for...in` calls.

One solution is to use `defineProperty`, but it is cumbersome and still has a side effect of modifying the global `Array.prototype`. I suggest moving `sets` to a free function.