Turn any flavor of allowable package.\+json bin into a normalized object.\hypertarget{md_sfcode_node_modules_npm_normalize_package_bin_README_autotoc_md18407}{}\doxysection{API}\label{md_sfcode_node_modules_npm_normalize_package_bin_README_autotoc_md18407}

\begin{DoxyCode}{0}
\DoxyCodeLine{const normalize = require('npm-\/normalize-\/package-\/bin')}
\DoxyCodeLine{const pkg = \{name: 'foo', bin: 'bar'\}}
\DoxyCodeLine{console.log(normalize(pkg)) // \{name:'foo', bin:\{foo: 'bar'\}\} }

\end{DoxyCode}


Also strips out weird dots and slashes to prevent accidental and/or malicious bad behavior when the package is installed. 