sprout icon indicating copy to clipboard operation
sprout copied to clipboard

Better composability

Open jstcki opened this issue 10 years ago • 1 comments

It would be nice if there were alternative Sprout functions which took the object as the last argument or even better created partially applied functions.

They could be named with the suffix 'With', similar like in allong.es.

For example:

var getName = sprout.getWith('name');
getName({name: 'foo'}); // => 'foo'
getName({name: 'bar'}); // => 'bar'
someArray.map(getName);

jstcki avatar Jun 22 '14 19:06 jstcki