Question ... perhaps a proposal: extract from object to object

peter miller fuchsia.groan at virgin.net
Fri Mar 31 09:53:34 UTC 2017


Hi Felipe,

>
> Object.pick([ 'a', 'c' ], { a: 1, b: 2, c: 3 })
>

I just dislike having identifiers in strings.

And while I'm here, nobody's mentioned the prior art of slicing hashes in  
perl. For that reason, I call my function `slice()` (but that's probably a  
bad name for web compatibility). Other prior art is GLSL component  
extraction -- `vec4 v4; vec2 v2 = v4.xy`

Peter

-- 
"There were drawings, and sheets of paper with writing on them, and it  
seemed that they were the sustenance of life, that here were the warlocks,  
almost the vehicles of destruction of man's life, but at the same time the  
very reason for his living." --- Maeve Gilmore/Titus Awakes.


More information about the es-discuss mailing list