oferei/json-gate — pull request #27 by andersonba (2014-03-28 20:20:38+00:00)
Title: Clear object using new form to additionalProperties

This feature remove all non-matching properties from original JSON object.

How to use:
`additionalProperties: 'remove'`

See bellow:

```
// Schema
{
str: { type: 'string' },
additionalProperties: 'remove'
}
````

```
// Object
{
str: 'hi',
extra: 'unimportant data, discard this',
extra1: 'discard this'
}
```

```
// Result object (after validate):
{
str: 'hi'
}
```

```
// Getting result object
newObject = schema.validate(Object);

// or
schema.validate(Object, function(err, obj) {
newObject = obj;
});
```

Obs.: I moved to new branch, because I needed merge my features in master.