o-contains

1.0.0 • Public • Published

o-contains

Returns true when keys and values in properties are contained in object

Install

$ npm install --save o-contains

Example

var objectContains = require('o-contains');

console.log(objectContains({name: 'radheya', age: 26}, {name: 'radheya'}));
// -> true

console.log(objectContains({name: 'radheya', age: 26}, {age: 98}));
// -> false

require('o-contains')(object, attrs)

Arguments:

  • object: Object
  • attrs: the attributes that to be checked

Returns: Returns true when keys and values in properties are contained in object

License

© 2016 vikram. MIT License

Package Sidebar

Install

npm i o-contains

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • vikramcse