2 * has-value <https://github.com/jonschlinkert/has-value>
4 * Copyright (c) 2014-2017, Jon Schlinkert.
5 * Licensed under the MIT License.
10 var isObject = require('isobject');
11 var hasValues = require('has-values');
12 var get = require('get-value');
14 module.exports = function(val, prop) {
15 return hasValues(isObject(val) && prop ? get(val, prop) : val);