\begin{quote}
Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. \end{quote}
\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31516}{}\doxysection{Install}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31516}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install has-\/values -\/-\/save }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31517}{}\doxysection{Usage}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31517}

\begin{DoxyCode}{0}
\DoxyCodeLine{var hasValue = require('has-\/values');}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue('a');}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue('');}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(1);}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(0);}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(0, true); // treat zero as a value}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(\{a: 'a'\}\});}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(\{\}\});}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(['a']);}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue([]);}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(function(foo) \{\}); // function length/arity}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(function() \{\});}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{}
\DoxyCodeLine{hasValue(true);}
\DoxyCodeLine{hasValue(false);}
\DoxyCodeLine{//=> true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31518}{}\doxysection{is\+Empty}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31518}
To test for empty values, do\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{function isEmpty(o, isZero) \{}
\DoxyCodeLine{  return !hasValue(o, isZero);}
\DoxyCodeLine{\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31519}{}\doxysection{Related projects}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31519}
You might also be interested in these projects\+:


\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/has-value}{\texttt{ has-\/value}}\+: Returns true if a value exists, false if empty. Works with deeply nested values using… \href{https://www.npmjs.com/package/has-value}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/has-value}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/is-plain-object}{\texttt{ is-\/plain-\/object}}\+: Returns true if an object was created by the {\ttfamily Object} constructor. $\vert$ \href{https://github.com/jonschlinkert/is-plain-object}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/isobject}{\texttt{ isobject}}\+: Returns true if the value is an object and not an array or null. $\vert$ \href{https://github.com/jonschlinkert/isobject}{\texttt{ homepage}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31520}{}\doxysection{Contributing}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31520}
Pull requests and stars are always welcome. For bugs and feature requests, \href{https://github.com/jonschlinkert/has-values/issues/new}{\texttt{ please create an issue}}.\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31521}{}\doxysection{Building docs}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31521}
Generate readme and API documentation with \href{https://github.com/verbose/verb}{\texttt{ verb}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install verb \&\& npm run docs }

\end{DoxyCode}


Or, if \href{https://github.com/verbose/verb}{\texttt{ verb}} is installed globally\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ verb }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31522}{}\doxysection{Running tests}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31522}
Install dev dependencies\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/d \&\& npm test }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31523}{}\doxysection{Author}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31523}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://github.com/jonschlinkert}{\texttt{ github/jonschlinkert}}
\item \href{http://twitter.com/jonschlinkert}{\texttt{ twitter/jonschlinkert}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31524}{}\doxysection{License}\label{md_sfcode_node_modules_unset_value_node_modules_has_values_README_autotoc_md31524}
Copyright © 2016, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \href{https://github.com/jonschlinkert/has-values/blob/master/LICENSE}{\texttt{ MIT license}}.

\DoxyHorRuler{0}


{\itshape This file was generated by \href{https://github.com/verbose/verb}{\texttt{ verb}}, v, on March 27, 2016.} 