{\bfseries{Contributing}}

\begin{quote}
Returns true if a value has the characteristics of a valid Java\+Script data descriptor. \end{quote}
Please consider following this project\textquotesingle{}s author, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}, and consider starring the project to show your \+:heart\+: and support.\hypertarget{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10125}{}\doxysection{Install}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10125}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save is-\/data-\/descriptor }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{var isDataDesc = require('is-\/data-\/descriptor'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10127}{}\doxysection{Examples}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10127}
{\ttfamily true} when the descriptor has valid properties with valid values.


\begin{DoxyCode}{0}
\DoxyCodeLine{// `value` can be anything}
\DoxyCodeLine{isDataDesc(\{value: 'foo'\})}
\DoxyCodeLine{isDataDesc(\{value: function() \{\}\})}
\DoxyCodeLine{isDataDesc(\{value: true\})}
\DoxyCodeLine{//=> true }

\end{DoxyCode}


{\ttfamily false} when not an object


\begin{DoxyCode}{0}
\DoxyCodeLine{isDataDesc('a')}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{isDataDesc(null)}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{isDataDesc([])}
\DoxyCodeLine{//=> false }

\end{DoxyCode}


{\ttfamily false} when the object has invalid properties


\begin{DoxyCode}{0}
\DoxyCodeLine{isDataDesc(\{value: 'foo', bar: 'baz'\})}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{isDataDesc(\{value: 'foo', bar: 'baz'\})}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{isDataDesc(\{value: 'foo', get: function()\{\}\})}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{isDataDesc(\{get: function()\{\}, value: 'foo'\})}
\DoxyCodeLine{//=> false }

\end{DoxyCode}


{\ttfamily false} when a value is not the correct type


\begin{DoxyCode}{0}
\DoxyCodeLine{isDataDesc(\{value: 'foo', enumerable: 'foo'\})}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{isDataDesc(\{value: 'foo', configurable: 'foo'\})}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{isDataDesc(\{value: 'foo', writable: 'foo'\})}
\DoxyCodeLine{//=> false }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10128}{}\doxysection{Valid properties}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10128}
The only valid data descriptor properties are the following\+:


\begin{DoxyItemize}
\item {\ttfamily configurable} (required)
\item {\ttfamily enumerable} (required)
\item {\ttfamily value} (optional)
\item {\ttfamily writable} (optional)
\end{DoxyItemize}

To be a valid data descriptor, either {\ttfamily value} or {\ttfamily writable} must be defined.

{\bfseries{Invalid properties}}

A descriptor may have additional {\itshape invalid} properties (an error will {\bfseries{not}} be thrown).


\begin{DoxyCode}{0}
\DoxyCodeLine{var foo = \{\};}
\DoxyCodeLine{}
\DoxyCodeLine{Object.defineProperty(foo, 'bar', \{}
\DoxyCodeLine{  enumerable: true,}
\DoxyCodeLine{  whatever: 'blah', // invalid, but doesn't cause an error}
\DoxyCodeLine{  get: function() \{}
\DoxyCodeLine{    return 'baz';}
\DoxyCodeLine{  \}}
\DoxyCodeLine{\});}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(foo.bar);}
\DoxyCodeLine{//=> 'baz' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10129}{}\doxysection{About}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10129}
$<$details$>$

Pull requests and stars are always welcome. For bugs and feature requests, \href{../../issues/new}{\texttt{ please create an issue}}.

$<$/details$>$

$<$details$>$

{\bfseries{Running Tests}} 

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command\+:


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

\end{DoxyCode}


$<$/details$>$

$<$details$>$

{\bfseries{Building docs}} 

\+\_\+(This project\textquotesingle{}s readme.\+md is generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb}}, please don\textquotesingle{}t edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)\+\_\+

To generate the readme, run the following command\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/g verbose/verb\#dev verb-\/generate-\/readme \&\& verb }

\end{DoxyCode}


$<$/details$>$\hypertarget{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10130}{}\doxysubsection{Related projects}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10130}
You might also be interested in these projects\+:


\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/is-accessor-descriptor}{\texttt{ is-\/accessor-\/descriptor}}\+: Returns true if a value has the characteristics of a valid Java\+Script accessor descriptor. $\vert$ \href{https://github.com/jonschlinkert/is-accessor-descriptor}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/is-data-descriptor}{\texttt{ is-\/data-\/descriptor}}\+: Returns true if a value has the characteristics of a valid Java\+Script data descriptor. $\vert$ \href{https://github.com/jonschlinkert/is-data-descriptor}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/is-descriptor}{\texttt{ is-\/descriptor}}\+: Returns true if a value has the characteristics of a valid Java\+Script descriptor. Works for… \href{https://github.com/jonschlinkert/is-descriptor}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/is-descriptor}{\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_extglob_node_modules_is_data_descriptor_README_autotoc_md10131}{}\doxysubsection{Contributors}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10131}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}    }\\\cline{1-2}
\endhead
21   &\href{https://github.com/jonschlinkert}{\texttt{ jonschlinkert}}    \\\cline{1-2}
2   &\href{https://github.com/realityking}{\texttt{ realityking}}   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10132}{}\doxysubsection{Author}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10132}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://github.com/jonschlinkert}{\texttt{ github/jonschlinkert}}
\item \href{https://twitter.com/jonschlinkert}{\texttt{ twitter/jonschlinkert}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10133}{}\doxysubsection{License}\label{md_sfcode_node_modules_extglob_node_modules_is_data_descriptor_README_autotoc_md10133}
Copyright © 2017, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \mbox{[}MIT License\mbox{]}(LICENSE).

\DoxyHorRuler{0}


{\itshape This file was generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb-\/generate-\/readme}}, v0.\+6.\+0, on November 01, 2017.} 