\href{https://saucelabs.com/u/to-arraybuffer}{\texttt{ }}

Convert from a Buffer to an Array\+Buffer as fast as possible.

Note that in some cases the returned Array\+Buffer is backed by the same memory as the original Buffer (but in other cases it is a copy), so {\bfseries{modifying the Array\+Buffer is not recommended}}.

This module is designed to work both in node.\+js and in all browsers with Array\+Buffer support when using \href{https://www.npmjs.com/package/buffer}{\texttt{ the Buffer implementation provided by Browserify}}.\hypertarget{md_sfcode_node_modules_to_arraybuffer_README_autotoc_md30483}{}\doxysection{Usage}\label{md_sfcode_node_modules_to_arraybuffer_README_autotoc_md30483}

\begin{DoxyCode}{0}
\DoxyCodeLine{var toArrayBuffer = require('to-\/arraybuffer')}
\DoxyCodeLine{}
\DoxyCodeLine{var buffer = new Buffer(100)}
\DoxyCodeLine{// Fill the buffer with some data}
\DoxyCodeLine{}
\DoxyCodeLine{var ab = toArrayBuffer(buffer)}
\DoxyCodeLine{// `ab` now contains the same data as `buffer` }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_to_arraybuffer_README_autotoc_md30484}{}\doxysection{License}\label{md_sfcode_node_modules_to_arraybuffer_README_autotoc_md30484}
MIT 