flatiron/resourceful — pull request #90 by indexzero (2012-07-13 05:16:36+00:00)
Title: Refactor `.restricted()` to work as expected

So the `.restricted()` definer was doing the opposite of what is was supposed to: _it was including only those properties marked as restricted instead of excluding them.

New usage:

``` js
var resourceful = require('resourceful');

var User = resourceful.define('User', function () {
this.string('username', { required: true });
this.string('password').restricted();
this.string('password-salt').restricted();
});

var inst = new User({
username: 'a-user',
password: 'super-secretz'
});

console.dir(inst.toJSON()); // { username: 'a-user', password: 'super-secretz' }
console.dir(inst.safeJSON()); // { username: 'a-user' }
```