aimless.js
aimless.js copied to clipboard
Make `weighted`'s TypeScript signature generic
This pull request updates weighted's TypeScript signature to accept other types of arrays.
Weighted just returns a random item from the given array and does not require it to be an array of numbers. I've found this function to be quite useful when selecting from non-numerical arrays.
(This change is too minor to be copyrightable, but to alleviate any concerns, I assign all copyright to ChrisCavs)
+1 would like to see this merged!