{\bfseries{Contributing}}

\begin{quote}
Normalize slashes in a file path to be posix/unix-\/like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled. \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_normalize_path_README_autotoc_md18352}{}\doxysection{Install}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18352}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save normalize-\/path }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const normalize = require('normalize-\/path');}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(normalize('\(\backslash\)\(\backslash\)foo\(\backslash\)\(\backslash\)bar\(\backslash\)\(\backslash\)baz\(\backslash\)\(\backslash\)')); }
\DoxyCodeLine{//=> '/foo/bar/baz' }

\end{DoxyCode}


{\bfseries{win32 namespaces}}


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(normalize('\(\backslash\)\(\backslash\)\(\backslash\)\(\backslash\)?\(\backslash\)\(\backslash\)UNC\(\backslash\)\(\backslash\)Server01\(\backslash\)\(\backslash\)user\(\backslash\)\(\backslash\)docs\(\backslash\)\(\backslash\)Letter.txt')); }
\DoxyCodeLine{//=> '//?/UNC/Server01/user/docs/Letter.txt'}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(normalize('\(\backslash\)\(\backslash\)\(\backslash\)\(\backslash\).\(\backslash\)\(\backslash\)CdRomX')); }
\DoxyCodeLine{//=> '//./CdRomX' }

\end{DoxyCode}


{\bfseries{Consecutive slashes}}

Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash.


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(normalize('.//foo//bar///////baz/')); }
\DoxyCodeLine{//=> './foo/bar/baz' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_normalize_path_README_autotoc_md18354}{}\doxysubsection{Trailing slashes}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18354}
By default trailing slashes are removed. Pass {\ttfamily false} as the last argument to disable this behavior and {\itshape {\bfseries{keep}} trailing slashes}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(normalize('foo\(\backslash\)\(\backslash\)bar\(\backslash\)\(\backslash\)baz\(\backslash\)\(\backslash\)', false)); //=> 'foo/bar/baz/'}
\DoxyCodeLine{console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_normalize_path_README_autotoc_md18355}{}\doxysection{Release history}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18355}
\hypertarget{md_sfcode_node_modules_normalize_path_README_autotoc_md18356}{}\doxysubsection{v3.\+0}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18356}
No breaking changes in this release.


\begin{DoxyItemize}
\item a check was added to ensure that \href{https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx\#namespaces}{\texttt{ win32 namespaces}} are handled properly by win32 {\ttfamily path.\+parse()} after a path has been normalized by this library.
\item a minor optimization was made to simplify how the trailing separator was handled
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_normalize_path_README_autotoc_md18357}{}\doxysection{About}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18357}
$<$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_normalize_path_README_autotoc_md18358}{}\doxysubsection{Related projects}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18358}
Other useful path-\/related libraries\+:


\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/contains-path}{\texttt{ contains-\/path}}\+: Return true if a file path contains the given path. $\vert$ \href{https://github.com/jonschlinkert/contains-path}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/is-absolute}{\texttt{ is-\/absolute}}\+: Returns true if a file path is absolute. Does not rely on the path module… \href{https://github.com/jonschlinkert/is-absolute}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/is-absolute}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/is-relative}{\texttt{ is-\/relative}}\+: Returns {\ttfamily true} if the path appears to be relative. $\vert$ \href{https://github.com/jonschlinkert/is-relative}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/parse-filepath}{\texttt{ parse-\/filepath}}\+: Pollyfill for node.\+js {\ttfamily path.\+parse}, parses a filepath into an object. $\vert$ \href{https://github.com/jonschlinkert/parse-filepath}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/path-ends-with}{\texttt{ path-\/ends-\/with}}\+: Return {\ttfamily true} if a file path ends with the given string/suffix. $\vert$ \href{https://github.com/jonschlinkert/path-ends-with}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/unixify}{\texttt{ unixify}}\+: Convert Windows file paths to unix paths. $\vert$ \href{https://github.com/jonschlinkert/unixify}{\texttt{ homepage}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_normalize_path_README_autotoc_md18359}{}\doxysubsection{Contributors}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18359}
\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
35   &\href{https://github.com/jonschlinkert}{\texttt{ jonschlinkert}}    \\\cline{1-2}
1   &\href{https://github.com/phated}{\texttt{ phated}}   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_normalize_path_README_autotoc_md18360}{}\doxysubsection{Author}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18360}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://linkedin.com/in/jonschlinkert}{\texttt{ Linked\+In Profile}}
\item \href{https://github.com/jonschlinkert}{\texttt{ Git\+Hub Profile}}
\item \href{https://twitter.com/jonschlinkert}{\texttt{ Twitter Profile}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_normalize_path_README_autotoc_md18361}{}\doxysubsection{License}\label{md_sfcode_node_modules_normalize_path_README_autotoc_md18361}
Copyright © 2018, \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 April 19, 2018.} 