diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
commit | 0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch) | |
tree | f9864d4a4148621378958794cbbfdc2393733283 /node_modules/has-value/index.js | |
parent | 6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff) |
upgrade dependencies
Diffstat (limited to 'node_modules/has-value/index.js')
-rw-r--r-- | node_modules/has-value/index.js | 9 |
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); }; |