aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/utility/matchesProperty.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/utility/matchesProperty.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/utility/matchesProperty.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/utility/matchesProperty.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/utility/matchesProperty.js
new file mode 100644
index 00000000..91e51a56
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/utility/matchesProperty.js
@@ -0,0 +1,32 @@
+var baseClone = require('../internal/baseClone'),
+ baseMatchesProperty = require('../internal/baseMatchesProperty');
+
+/**
+ * Creates a function that compares the property value of `path` on a given
+ * object to `value`.
+ *
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * _.find(users, _.matchesProperty('user', 'fred'));
+ * // => { 'user': 'fred' }
+ */
+function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, true));
+}
+
+module.exports = matchesProperty;