This repository has been archived by the owner on Aug 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
array/masks #6
Comments
Open
Just an idea, I like the name Intuitively, I think they do slightly different things. var customers = [
{ name: 'jeff', parkingSpace: 22 },
{ name: 'mike' }
];
var pickedSpaces = customers.map(picks('parkingSpace')); // [{parkingSpace:22},{parkingSpace:undefined}]
var maskedSpaces = customers.map(masks('parkingSpace')); // [{parkingSpace:22},{}] Thoughts? |
The only difference between those two results would be the resulting value of { name: 'jeff', parkingSpace: 22 } // -> { parkingSpace: 22 }
{ name: 'jeff', parkingSpace: undefined } // -> { parkingSpace: undefined }
{ name: 'jeff' } // -> { } |
I think that's the better behavior, too. So going along with that, I like the name |
Works for me. I was just aping mout (http://moutjs.com/docs/v0.9/object.html#pick). |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Gets multiple values from items in an array.
The text was updated successfully, but these errors were encountered: