PATH:
usr
/
local
/
lib
/
node_modules
/
bower
/
lib
/
node_modules
/
bower-config
/
node_modules
/
mout
/
object
var forOwn = require('./forOwn'); var isArray = require('../lang/isArray'); function containsMatch(array, pattern) { var i = -1, length = array.length; while (++i < length) { if (deepMatches(array[i], pattern)) { return true; } } return false; } function matchArray(target, pattern) { var i = -1, patternLength = pattern.length; while (++i < patternLength) { if (!containsMatch(target, pattern[i])) { return false; } } return true; } function matchObject(target, pattern) { var result = true; forOwn(pattern, function(val, key) { if (!deepMatches(target[key], val)) { // Return false to break out of forOwn early return (result = false); } }); return result; } /** * Recursively check if the objects match. */ function deepMatches(target, pattern){ if (target && typeof target === 'object' && pattern && typeof pattern === 'object') { if (isArray(target) && isArray(pattern)) { return matchArray(target, pattern); } else { return matchObject(target, pattern); } } else { return target === pattern; } } module.exports = deepMatches;
[-] functions.js
[edit]
[-] forOwn.js
[edit]
[-] find.js
[edit]
[-] equals.js
[edit]
[-] omit.js
[edit]
[-] deepFillIn.js
[edit]
[-] fillIn.js
[edit]
[-] reduce.js
[edit]
[-] max.js
[edit]
[+]
..
[-] contains.js
[edit]
[-] unset.js
[edit]
[-] some.js
[edit]
[-] pluck.js
[edit]
[-] flatten.js
[edit]
[-] has.js
[edit]
[-] merge.js
[edit]
[-] bindAll.js
[edit]
[-] pick.js
[edit]
[-] min.js
[edit]
[-] get.js
[edit]
[-] deepMatches.js
[edit]
[-] mixIn.js
[edit]
[-] values.js
[edit]
[-] size.js
[edit]
[-] reject.js
[edit]
[-] forIn.js
[edit]
[-] hasOwn.js
[edit]
[-] map.js
[edit]
[-] namespace.js
[edit]
[-] filter.js
[edit]
[-] every.js
[edit]
[-] matches.js
[edit]
[-] result.js
[edit]
[-] deepMixIn.js
[edit]
[-] set.js
[edit]
[-] keys.js
[edit]