1.0.0 • Published 9 years ago
nulled-out v1.0.0
nulled-out
nulled-out creates a copy on an object with nulled-out values.
Install
$ npm install nulled-out
Example
var nulled = require('nulled-out')
nulled({
name: { type: 'string' },
human: { type: 'boolean' },
likes: { type: 'array' }
})
/*
{
name: null,
human: null,
likes: null
}
*/
Suss out my motivation…
- dynamic properties vs pre-defined structure (via this article)
- valid-object (from where I shamelessly stole my example object)
License
1.0.0
9 years ago