HackerTrans
TopNewTrendsCommentsPastAskShowJobs

chriscavs

no profile record

Submissions

Show HN: Aimless.js – the missing js randomness library

github.com
64 points·by chriscavs·vor 3 Jahren·24 comments

comments

chriscavs
·vor 3 Jahren·discuss
I believe sequence will accomplish what you're looking for here

const randomSeq = sequence([1,2,3]) // could return [3,1,2], [2,3,1], etc.
chriscavs
·vor 3 Jahren·discuss
Thanks for the comment! Yes it is a bit of a provocative title hahaha. i don't believe my library can be compared to random-js, since the goals of each are very different. random-js wants to provide the "engine" that replaces Math.random. I want to provide a library of utilities that are engine-agnostic. you can pull in random-js and use their engines to power aimless.js, as an example.
chriscavs
·vor 3 Jahren·discuss
thanks for the comment, i'm happy you like it!
chriscavs
·vor 3 Jahren·discuss
thanks for bringing this to my attention, I will be sure to check this out
chriscavs
·vor 3 Jahren·discuss
Thank you for the comment! I am aware of this issue, and am working to address in v1.1.0. The context you provide here is very helpful for me. I've opened an issue on github for this: https://github.com/ChrisCavs/aimless.js/issues/2