has-values
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "has-values", | ||
"description": "Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. ", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"homepage": "https://github.com/jonschlinkert/has-values", | ||
@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", |
@@ -24,3 +24,3 @@ # has-values [![NPM version](https://img.shields.io/npm/v/has-values.svg?style=flat)](https://www.npmjs.com/package/has-values) [![NPM monthly downloads](https://img.shields.io/npm/dm/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![NPM total downloads](https://img.shields.io/npm/dt/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/has-values.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/has-values) | ||
```js | ||
const isEmpty = (val, allowZero) => !has(val, allowZero); | ||
const isEmpty = val => !has(val); | ||
``` | ||
@@ -35,3 +35,2 @@ | ||
console.log(has([0])); //=> true | ||
console.log(has([0], false)); //=> false | ||
console.log(has([[[]]])); //=> false | ||
@@ -38,0 +37,0 @@ console.log(has([[], []])); //=> false |
9657
212