hay/stapes — pull request #38 by santervo (2013-03-26 21:59:01+00:00)
Title: Pick for selecting part of object attributes

Hey Hay

I've been using Stapes as a view model layer for Rivets.js, and Backbone as persistence layer.

In the view model layer I have both data that is going to be persisted (form data) and transient view attributes (such as whether todo entry is editable or not).

I've been missing a function similar to .pick in Underscore and Backbone to select only persistable attributes.

```
module.set({
title: "Wash dishes",
completed: true,
editable: true
});

var persistableAttrs = module.pick('title', 'completed');
// { title: "Wash dishes", completed: true }
```

If you care to include this to Stapes, you'll find tests, documentation and implementation with this pull request.