You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think a b.shuffle() function would be useful, that could shuffle both collections or simple arrays. I remember in my first basil.js project I needed a lot of shuffling of collections and my classmates were in the same situation. I ended up using a Fisher-Yates shuffle, but as I was a bloody beginner I had a lot of trouble implementing it.
So it would be nice to have a simple b.shuffle({collection|array}) method.
Any thoughts?
Please flag as feature request.
The text was updated successfully, but these errors were encountered:
I personally don't need this. Feels not very basil related but rather a js array feature. I would rather point people to use underscore.js ... for such things. But I won't veto if the rest is very keen on it.
If there were a standard js function for shuffling an array, then we wouldn't need it. But it is a bit more involved to do a proper shuffle, so I think it would be helpful. In the context how basil is used at our school the need to shuffle stuff came up a few times.
I think a
b.shuffle()
function would be useful, that could shuffle both collections or simple arrays. I remember in my first basil.js project I needed a lot of shuffling of collections and my classmates were in the same situation. I ended up using a Fisher-Yates shuffle, but as I was a bloody beginner I had a lot of trouble implementing it.So it would be nice to have a simple
b.shuffle({collection|array})
method.Any thoughts?
Please flag as feature request.
The text was updated successfully, but these errors were encountered: