{\itshape unicode-\/match-\/property-\/ecmascript} matches a given Unicode property or \href{https://github.com/mathiasbynens/unicode-property-aliases-ecmascript}{\texttt{ property alias}} to its canonical property name without applying \href{https://github.com/mathiasbynens/unicode-loose-match}{\texttt{ loose matching}} per the algorithm used for \href{https://github.com/tc39/proposal-regexp-unicode-property-escapes}{\texttt{ Reg\+Exp Unicode property escapes in ECMAScript}}. Consider it a strict alternative to loose matching.\hypertarget{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31274}{}\doxysection{Installation}\label{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31274}
To use {\itshape unicode-\/match-\/property-\/ecmascript} programmatically, install it as a dependency via \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install unicode-\/match-\/property-\/ecmascript }

\end{DoxyCode}


Then, {\ttfamily require} it\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{const matchProperty = require('unicode-\/match-\/property-\/ecmascript'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31275}{}\doxysection{API}\label{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31275}
This module exports a single function named {\ttfamily match\+Property}.\hypertarget{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31276}{}\doxysubsection{$<$tt$>$match\+Property(value)$<$/tt$>$}\label{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31276}
This function takes a string {\ttfamily value} and attempts to match it to a canonical Unicode property name. If there’s a match, it returns the canonical property name. Otherwise, it throws an exception.


\begin{DoxyCode}{0}
\DoxyCodeLine{// Find the canonical property name:}
\DoxyCodeLine{matchProperty('sc')}
\DoxyCodeLine{// → 'Script'}
\DoxyCodeLine{}
\DoxyCodeLine{matchProperty('Script')}
\DoxyCodeLine{// → 'Script'}
\DoxyCodeLine{}
\DoxyCodeLine{matchProperty('script') // Note: incorrect casing.}
\DoxyCodeLine{// → throws }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31277}{}\doxysection{Author}\label{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31277}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{1}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ \href{https://twitter.com/mathias}{\texttt{ }}    }\\\cline{1-1}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ \href{https://twitter.com/mathias}{\texttt{ }}    }\\\cline{1-1}
\endhead
\href{https://mathiasbynens.be/}{\texttt{ Mathias Bynens}}   \\\cline{1-1}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31278}{}\doxysection{License}\label{md_sfcode_node_modules_unicode_match_property_ecmascript_README_autotoc_md31278}
{\itshape unicode-\/match-\/property-\/ecmascript} is available under the \href{https://mths.be/mit}{\texttt{ MIT}} license. 