{\itshape number} primitive that conforms as valid {\itshape array length}\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_array_length_autotoc_md9923}{}\doxysection{$<$tt$>$array-\/length/coerce$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_array_length_autotoc_md9923}
Follows \href{safe-integer.md\#safe-integercoerce}{\texttt{ {\ttfamily safe-\/integer/coerce}}} but returns {\ttfamily null} in place of values which are below {\ttfamily 0}


\begin{DoxyCode}{0}
\DoxyCodeLine{const coerceToArrayLength = require("{}type/safe-\/integer/coerce"{});}
\DoxyCodeLine{}
\DoxyCodeLine{coerceToArrayLength("{}12.95"{}); // 12}
\DoxyCodeLine{coerceToArrayLength(9007199254740992); // null}
\DoxyCodeLine{coerceToArrayLength(null); // null }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_array_length_autotoc_md9924}{}\doxysection{$<$tt$>$array-\/length/ensure$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_array_length_autotoc_md9924}
If given argument is an {\itshape array length} coercible value (via \href{\#array-lengthcoerce}{\texttt{ {\ttfamily array-\/length/coerce}}}) returns result number. Otherwise {\ttfamily Type\+Error} is thrown.


\begin{DoxyCode}{0}
\DoxyCodeLine{const ensureArrayLength = require("{}type/array-\/length/ensure"{});}
\DoxyCodeLine{}
\DoxyCodeLine{ensureArrayLength(12.93); // "{}12"{}}
\DoxyCodeLine{ensureArrayLength(9007199254740992); // Thrown TypeError: null is not a valid array length }

\end{DoxyCode}
 