cm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agoNode Moduleslemmy.mlimagemessage-square43linkfedilinkarrow-up1664arrow-down14cross-posted to: programmerhumor@lemmy.ml
arrow-up1660arrow-down1imageNode Moduleslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agomessage-square43linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarevithigar@lemmy.calinkfedilinkarrow-up2·8 hours agoI’m currently on a crusade against lodash where I work.
minus-squaremindbleach@sh.itjust.workslinkfedilinkarrow-up1·6 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·4 hours 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.