1.0.0 • Published 8 years ago

o-contains v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

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