aboutsummaryrefslogtreecommitdiff
path: root/node_modules/has-value/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/has-value/index.js')
-rw-r--r--node_modules/has-value/index.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/node_modules/has-value/index.js b/node_modules/has-value/index.js
index 90687c877..c23749488 100644
--- a/node_modules/has-value/index.js
+++ b/node_modules/has-value/index.js
@@ -1,7 +1,7 @@
/*!
* has-value <https://github.com/jonschlinkert/has-value>
*
- * Copyright (c) 2014-2016, Jon Schlinkert.
+ * Copyright (c) 2014-2017, Jon Schlinkert.
* Licensed under the MIT License.
*/
@@ -11,9 +11,6 @@ var isObject = require('isobject');
var hasValues = require('has-values');
var get = require('get-value');
-module.exports = function(obj, prop, noZero) {
- if (isObject(obj)) {
- return hasValues(get(obj, prop), noZero);
- }
- return hasValues(obj, prop);
+module.exports = function(val, prop) {
+ return hasValues(isObject(val) && prop ? get(val, prop) : val);
};