This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set.\hypertarget{md_sfcode_node_modules_caseless_README_autotoc_md5037}{}\doxysection{Usage}\label{md_sfcode_node_modules_caseless_README_autotoc_md5037}

\begin{DoxyCode}{0}
\DoxyCodeLine{var headers = \{\}}
\DoxyCodeLine{  , c = caseless(headers)}
\DoxyCodeLine{  ;}
\DoxyCodeLine{c.set('a-\/Header', 'asdf')}
\DoxyCodeLine{c.get('a-\/header') === 'asdf' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caseless_README_autotoc_md5038}{}\doxysection{has(key)}\label{md_sfcode_node_modules_caseless_README_autotoc_md5038}
Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with.


\begin{DoxyCode}{0}
\DoxyCodeLine{c.has('a-\/header') === 'a-\/Header' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caseless_README_autotoc_md5039}{}\doxysection{set(key, value\mbox{[}, clobber=true\mbox{]})}\label{md_sfcode_node_modules_caseless_README_autotoc_md5039}
Set is fairly straight forward except that if the header exists and clobber is disabled it will add `',\textquotesingle{}+value\`{} to the existing header.


\begin{DoxyCode}{0}
\DoxyCodeLine{c.set('a-\/Header', 'fdas')}
\DoxyCodeLine{c.set('a-\/HEADER', 'more', false)}
\DoxyCodeLine{c.get('a-\/header') === 'fdsa,more' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caseless_README_autotoc_md5040}{}\doxysection{swap(key)}\label{md_sfcode_node_modules_caseless_README_autotoc_md5040}
Swaps the casing of a header with the new one that is passed in.


\begin{DoxyCode}{0}
\DoxyCodeLine{var headers = \{\}}
\DoxyCodeLine{  , c = caseless(headers)}
\DoxyCodeLine{  ;}
\DoxyCodeLine{c.set('a-\/Header', 'fdas')}
\DoxyCodeLine{c.swap('a-\/HEADER')}
\DoxyCodeLine{c.has('a-\/header') === 'a-\/HEADER'}
\DoxyCodeLine{headers === \{'a-\/HEADER': 'fdas'\} }

\end{DoxyCode}
 