1 # has-values [![NPM version](https://img.shields.io/npm/v/has-values.svg?style=flat)](https://www.npmjs.com/package/has-values) [![NPM downloads](https://img.shields.io/npm/dm/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![Build Status](https://img.shields.io/travis/jonschlinkert/has-values.svg?style=flat)](https://travis-ci.org/jonschlinkert/has-values)
3 > Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays.
7 Install with [npm](https://www.npmjs.com/):
10 $ npm install has-values --save
16 var hasValue = require('has-values');
30 hasValue(0, true); // treat zero as a value
45 hasValue(function(foo) {}); // function length/arity
48 hasValue(function() {});
58 To test for empty values, do:
61 function isEmpty(o, isZero) {
62 return !hasValue(o, isZero);
68 You might also be interested in these projects:
70 * [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value)
71 * [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object)
72 * [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject)
76 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/has-values/issues/new).
80 Generate readme and API documentation with [verb](https://github.com/verbose/verb):
83 $ npm install verb && npm run docs
86 Or, if [verb](https://github.com/verbose/verb) is installed globally:
94 Install dev dependencies:
97 $ npm install -d && npm test
104 * [github/jonschlinkert](https://github.com/jonschlinkert)
105 * [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
109 Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
110 Released under the [MIT license](https://github.com/jonschlinkert/has-values/blob/master/LICENSE).
114 _This file was generated by [verb](https://github.com/verbose/verb), v, on March 27, 2016._