You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
380 B

4 years ago
  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. 'use strict';
  8. var isObject = require('isobject');
  9. var hasValues = require('has-values');
  10. var get = require('get-value');
  11. module.exports = function(val, prop) {
  12. return hasValues(isObject(val) && prop ? get(val, prop) : val);
  13. };