cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agoNode Modulesimagemessage-square48linkfedilinkarrow-up1696arrow-down14cross-posted to: programmerhumor@lemmy.ml
arrow-up1692arrow-down1imageNode Modulescm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agomessage-square48linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squaremindbleach@sh.itjust.workslinkfedilinkarrow-up1·17 hours ago Lodash provides modular methods for working with arrays, objects, strings, and more. I dunno. If it makes everything Array-like act like a goddamn Array, I’m tempted to start using it. ‘What do you mean you can’t .map a Set? It’s iterable! Figure it out!’
minus-squarevithigar@lemmy.calinkfedilinkarrow-up2·15 hours agoYou can though? mySet.values().map(mappingFunc) will create a new iterator transformed by the mapping function.
I dunno. If it makes everything Array-like act like a goddamn Array, I’m tempted to start using it.
‘What do you mean you can’t .map a Set? It’s iterable! Figure it out!’
You can though?
mySet.values().map(mappingFunc)
will create a new iterator transformed by the mapping function.