o-contains
v1.0.0
Published
Returns true when keys and values in properties are contained in object
Downloads
1
Maintainers
Readme
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
: Objectattrs
: the attributes that to be checked
Returns: Returns true when keys and values in properties are contained in object
License
© 2016 vikram. MIT License