I am the author of the rot.js library. A naming collision prevents usage of both our libraries together, as your Array.prototype.random does something different than mine does. In particular, your random() randomizes the array (something my library offers under the name randomize()), but my random() implementation returns a value at random.
Moreover, my library has Array.prototype.random as a public API, so adjusting that on my side would be a breaking, backwards-incompatible change. May I suggest doing one of the following:
1) renaming your random to randomize, adjusting its usage in index.js accordingly;
2) moving the randomization logic out of Array.prototype completely.
I am willing to send you a PR to any one of these two approaches, should you consider one of them feasible.
This issue is motivated primarily by https://github.com/ondras/rot.js/pull/128.
I am the author of the rot.js library. A naming collision prevents usage of both our libraries together, as your
Array.prototype.random
does something different than mine does. In particular, yourrandom()
randomizes the array (something my library offers under the namerandomize()
), but myrandom()
implementation returns a value at random.Moreover, my library has
Array.prototype.random
as a public API, so adjusting that on my side would be a breaking, backwards-incompatible change. May I suggest doing one of the following:1) renaming your
random
torandomize
, adjusting its usage inindex.js
accordingly;2) moving the randomization logic out of
Array.prototype
completely.I am willing to send you a PR to any one of these two approaches, should you consider one of them feasible.