cm0002@lemmy.world to Programmer Humor@programming.dev · 5 days agoNode Moduleslemmy.mlimagemessage-square49linkfedilinkarrow-up1681arrow-down17
arrow-up1674arrow-down1imageNode Moduleslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 5 days agomessage-square49linkfedilink
minus-squarevithigar@lemmy.calinkfedilinkarrow-up2·4 days agoI’m currently on a crusade against lodash where I work.
minus-squaremindbleach@sh.itjust.workslinkfedilinkarrow-up1·4 days 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-up3·4 days agoYou can though? mySet.values().map(mappingFunc) will create a new iterator transformed by the mapping function.
I’m currently on a crusade against lodash where I work.
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.