request the caniuse data to check browsers compatibilities\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5006}{}\doxysection{Installation}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5006}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ yarn add caniuse-\/api }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const caniuse = require('caniuse-\/api')}
\DoxyCodeLine{}
\DoxyCodeLine{caniuse.getSupport('border-\/radius')}
\DoxyCodeLine{caniuse.isSupported('border-\/radius', 'ie 8, ie 9')}
\DoxyCodeLine{caniuse.setBrowserScope('> 5\%, last 1 version')}
\DoxyCodeLine{caniuse.getSupport('border-\/radius')}
\DoxyCodeLine{// ... }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5008}{}\doxysection{API}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5008}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5009}{}\doxysubsubsection{$<$tt$>$caniuse.\+get\+Support(feature)$<$/tt$>$}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5009}
{\itshape ask since which browsers versions a feature is available}


\begin{DoxyItemize}
\item {\ttfamily y}\+: Since which browser version the feature is available
\item {\ttfamily n}\+: Up to which browser version the feature is unavailable
\item {\ttfamily a}\+: Up to which browser version the feature is partially supported
\item {\ttfamily x}\+: Up to which browser version the feature is prefixed
\end{DoxyItemize}


\begin{DoxyCode}{0}
\DoxyCodeLine{caniuse.getSupport('border-\/radius', true)}
\DoxyCodeLine{/*}
\DoxyCodeLine{\{ and\_chr: \{ y: 67 \},}
\DoxyCodeLine{  and\_ff: \{ y: 60 \},}
\DoxyCodeLine{  and\_qq: \{ y: 1.2 \},}
\DoxyCodeLine{  and\_uc: \{ y: 11.8 \},}
\DoxyCodeLine{  android: \{ y: 2.1, x: 2.1 \},}
\DoxyCodeLine{  baidu: \{ y: 7.12 \},}
\DoxyCodeLine{  chrome: \{ y: 4, x: 4 \},}
\DoxyCodeLine{  edge: \{ y: 12 \},}
\DoxyCodeLine{  firefox: \{ a: 2, x: 3.6, y: 3 \},}
\DoxyCodeLine{  ie: \{ n: 8, y: 9 \},}
\DoxyCodeLine{  ie\_mob: \{ y: 10 \},}
\DoxyCodeLine{  ios\_saf: \{ y: 3.2, x: 3.2 \},}
\DoxyCodeLine{  op\_mini: \{\},}
\DoxyCodeLine{  op\_mob: \{ n: 10, y: 11 \},}
\DoxyCodeLine{  opera: \{ n: 10, y: 10.5 \},}
\DoxyCodeLine{  safari: \{ y: 3.1, x: 4 \},}
\DoxyCodeLine{  samsung: \{ y: 4 \} \}}
\DoxyCodeLine{*/ }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5010}{}\doxysubsubsection{$<$tt$>$caniuse.\+is\+Supported(feature, browsers)$<$/tt$>$}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5010}
{\itshape ask if a feature is supported by some browsers}


\begin{DoxyCode}{0}
\DoxyCodeLine{caniuse.isSupported('border-\/radius', 'ie 8, ie 9') // false}
\DoxyCodeLine{caniuse.isSupported('border-\/radius', 'ie 9') // true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5011}{}\doxysubsubsection{$<$tt$>$caniuse.\+find(query)$<$/tt$>$}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5011}
{\itshape search for a caniuse feature name}

Ex\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{caniuse.find('radius') // ['border-\/radius']}
\DoxyCodeLine{caniuse.find('nothingness') // []}
\DoxyCodeLine{caniuse.find('css3')}
\DoxyCodeLine{/*}
\DoxyCodeLine{[ 'css3-\/attr',}
\DoxyCodeLine{  'css3-\/boxsizing',}
\DoxyCodeLine{  'css3-\/colors',}
\DoxyCodeLine{  'css3-\/cursors-\/grab',}
\DoxyCodeLine{  'css3-\/cursors-\/newer',}
\DoxyCodeLine{  'css3-\/cursors',}
\DoxyCodeLine{  'css3-\/tabsize' ]}
\DoxyCodeLine{*/ }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5012}{}\doxysubsubsection{$<$tt$>$caniuse.\+get\+Latest\+Stable\+Browsers()$<$/tt$>$}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5012}
{\itshape get the current version for each browser}


\begin{DoxyCode}{0}
\DoxyCodeLine{caniuse.getLatestStableBrowsers()}
\DoxyCodeLine{/*}
\DoxyCodeLine{[ 'and\_chr 67',}
\DoxyCodeLine{  'and\_ff 60',}
\DoxyCodeLine{  'and\_qq 1.2',}
\DoxyCodeLine{  'and\_uc 11.8',}
\DoxyCodeLine{  'android 67',}
\DoxyCodeLine{  'baidu 7.12',}
\DoxyCodeLine{  'bb 10',}
\DoxyCodeLine{  'chrome 67',}
\DoxyCodeLine{  'edge 17',}
\DoxyCodeLine{  'firefox 61',}
\DoxyCodeLine{  'ie 11',}
\DoxyCodeLine{  'ie\_mob 11',}
\DoxyCodeLine{  'ios\_saf 11.3-\/11.4',}
\DoxyCodeLine{  'op\_mini all',}
\DoxyCodeLine{  'op\_mob 46',}
\DoxyCodeLine{  'opera 53',}
\DoxyCodeLine{  'safari 11.1',}
\DoxyCodeLine{  'samsung 7.2' ]}
\DoxyCodeLine{*/ }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5013}{}\doxysubsubsection{$<$tt$>$caniuse.\+get\+Browser\+Scope()$<$/tt$>$}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5013}
{\itshape returns a list of browsers currently used for the scope of operations}


\begin{DoxyCode}{0}
\DoxyCodeLine{caniuse.getBrowserScope()}
\DoxyCodeLine{/*}
\DoxyCodeLine{[ 'and\_chr',}
\DoxyCodeLine{  'and\_ff',}
\DoxyCodeLine{  'and\_qq',}
\DoxyCodeLine{  'and\_uc',}
\DoxyCodeLine{  'android',}
\DoxyCodeLine{  'baidu',}
\DoxyCodeLine{  'chrome',}
\DoxyCodeLine{  'edge',}
\DoxyCodeLine{  'firefox',}
\DoxyCodeLine{  'ie',}
\DoxyCodeLine{  'ie\_mob',}
\DoxyCodeLine{  'ios\_saf',}
\DoxyCodeLine{  'op\_mini',}
\DoxyCodeLine{  'op\_mob',}
\DoxyCodeLine{  'opera',}
\DoxyCodeLine{  'safari',}
\DoxyCodeLine{  'samsung' ]}
\DoxyCodeLine{*/ }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5014}{}\doxysubsubsection{$<$tt$>$caniuse.\+set\+Browser\+Scope(browserscope)$<$/tt$>$}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5014}
{\itshape if you do not like the default browser scope, you can set it globally by using this method}


\begin{DoxyItemize}
\item browserscope should be a \textquotesingle{}autoprefixer\textquotesingle{} formatted string
\end{DoxyItemize}


\begin{DoxyCode}{0}
\DoxyCodeLine{caniuse.setBrowserScope('> 5\%, last 2 versions, Firefox ESR, Opera 12.1') }

\end{DoxyCode}


\DoxyHorRuler{0}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5016}{}\doxysection{@ref /opt/lampp/htdocs/sfcode/node\+\_\+modules/caniuse-\/api/\+CHANGELOG.\+md \char`\"{}\+Changelog\char`\"{}}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5016}
\hypertarget{md_sfcode_node_modules_caniuse_api_README_autotoc_md5017}{}\doxysection{\mbox{[}\+License\mbox{]}(\+LICENSE)}\label{md_sfcode_node_modules_caniuse_api_README_autotoc_md5017}
