cm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agoNode Moduleslemmy.mlimagemessage-square43fedilinkarrow-up1650arrow-down14
arrow-up1646arrow-down1imageNode Moduleslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agomessage-square43fedilink
minus-squarevithigar@lemmy.calinkfedilinkarrow-up2·5 hours agoI’m currently on a crusade against lodash where I work.
minus-squaremindbleach@sh.itjust.workslinkfedilinkarrow-up1·3 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·35 minutes 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.