\begin{quote}
Convert Windows backslash paths to slash paths\+: {\ttfamily foo\textbackslash{}\textbackslash{}bar} ➔ {\ttfamily foo/bar} \end{quote}
\href{http://superuser.com/a/176395/6877}{\texttt{ Forward-\/slash paths can be used in Windows}} as long as they\textquotesingle{}re not extended-\/length paths and don\textquotesingle{}t contain any non-\/ascii characters.

This was created since the {\ttfamily path} methods in Node.\+js outputs {\ttfamily \textbackslash{}\textbackslash{}} paths on Windows.\hypertarget{md_sfcode_node_modules_slash_readme_autotoc_md27031}{}\doxysection{Install}\label{md_sfcode_node_modules_slash_readme_autotoc_md27031}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install slash }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const path = require('path');}
\DoxyCodeLine{const slash = require('slash');}
\DoxyCodeLine{}
\DoxyCodeLine{const string = path.join('foo', 'bar');}
\DoxyCodeLine{// Unix    => foo/bar}
\DoxyCodeLine{// Windows => foo\(\backslash\)\(\backslash\)bar}
\DoxyCodeLine{}
\DoxyCodeLine{slash(string);}
\DoxyCodeLine{// Unix    => foo/bar}
\DoxyCodeLine{// Windows => foo/bar }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_slash_readme_autotoc_md27033}{}\doxysection{API}\label{md_sfcode_node_modules_slash_readme_autotoc_md27033}
\hypertarget{md_sfcode_node_modules_slash_readme_autotoc_md27034}{}\doxysubsection{slash(path)}\label{md_sfcode_node_modules_slash_readme_autotoc_md27034}
Type\+: {\ttfamily string}

Accepts a Windows backslash path and returns a path with forward slashes.\hypertarget{md_sfcode_node_modules_slash_readme_autotoc_md27035}{}\doxysection{License}\label{md_sfcode_node_modules_slash_readme_autotoc_md27035}
MIT © \href{https://sindresorhus.com}{\texttt{ Sindre Sorhus}} 