@cm0002@lemmy.world to Programmer Humor@programming.dev • 9 days agoNode Moduleslemmy.mlimagemessage-square55fedilinkarrow-up1723arrow-down16cross-posted to: programmerhumor@lemmy.ml
arrow-up1717arrow-down1imageNode Moduleslemmy.ml@cm0002@lemmy.world to Programmer Humor@programming.dev • 9 days agomessage-square55fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-square@mindbleach@sh.itjust.workslinkfedilink5•9 days agoThe thing you want from jQuery was added to all browsers in 2018.
minus-square@vithigar@lemmy.calinkfedilink2•8 days agoI’m currently on a crusade against lodash where I work.
minus-square@mindbleach@sh.itjust.workslinkfedilink1•8 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-square@vithigar@lemmy.calinkfedilink3•8 days agoYou can though? mySet.values().map(mappingFunc) will create a new iterator transformed by the mapping function.
The thing you want from jQuery was added to all browsers in 2018.
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.