Neanderthals Paint Mammals
Learn how companies like Phone2Action are using npm in their front-end developmentJoin the conversation »

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'
    }

Install

npm i restrict-object

DownloadsWeekly Downloads

3

Version

0.0.2

License

MIT

Last publish

Collaborators

  • avatar