| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | /*! |
| 2 | * has-value <https://github.com/jonschlinkert/has-value> | ||||
| 3 | * | ||||
| 4 | * Copyright (c) 2014-2017, Jon Schlinkert. | ||||
| 5 | * Licensed under the MIT License. | ||||
| 6 | */ | ||||
| 7 | |||||
| 8 | 'use strict'; | ||||
| 9 | |||||
| 10 | var isObject = require('isobject'); | ||||
| 11 | var hasValues = require('has-values'); | ||||
| 12 | var get = require('get-value'); | ||||
| 13 | |||||
| 14 | module.exports = function(val, prop) { | ||||
| 15 | return hasValues(isObject(val) && prop ? get(val, prop) : val); | ||||
| 16 | }; | ||||