restrict-object

0.0.2 • Public • Published

restrict-object

Allows javascript to restrict object key value pairs by an array

    var refinedObject = restrictObject(
        {
            want: 'yes',
            wantalso: 'ohh yeah',
            dont: 'nope'
        },
        [ 'want', 'wantalso' ]
    );
    
    refinedObject == {
      want: 'yes',
      wantalso: 'ohh yeah'
    }

Readme

Keywords

Package Sidebar

Install

npm i restrict-object

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • relaxation