nanodeath/CrowLib — pull request #19 by funforums (2014-12-03 11:59:54+00:00)
Title: Created the ArrayUtilities class for shuffle, indexOf was kept the way it is.

To avoid modifying Array.prototype to have the shuffle function, I did this modifications, creating an ArrayUtilities object.

All the occurrences of shuffle() have been patched (1). since indexOf is standard for ECMAscript5, we should decide whether we want to move also indexOf into the ArrayUtilities for backwards-compatibility.

I don't yet know how do you test this library and if you have specified test stages or protocols, so please note that this was not tested yet.

Array.indexOf is already there for recent versions of all the browsers, but older ones will take the specified prototype here, and then the issue of extending Array.prototype would pop again. So we have to decide whether this approach is ok to be used for indexOf as well.