\href{https://github.com/zloirock/core-js/tree/master/packages/core-js-compat}{\texttt{ {\ttfamily core-\/js-\/compat} package}} contains data about the necessity of \href{https://github.com/zloirock/core-js}{\texttt{ {\ttfamily core-\/js}}} modules and API for getting a list of required core-\/js modules by browserslist query.


\begin{DoxyCode}{0}
\DoxyCodeLine{const \{}
\DoxyCodeLine{  list,                  // array of required modules}
\DoxyCodeLine{  targets,               // object with targets for each module}
\DoxyCodeLine{\} = require('core-\/js-\/compat')(\{}
\DoxyCodeLine{  targets: '> 2.5\%',     // browserslist query or object of minimum environment versions to support}
\DoxyCodeLine{  filter: /\string^(es|web)\(\backslash\)./, // optional filter -\/ string-\/prefix, regexp or list of modules}
\DoxyCodeLine{  version: '3.4',        // used `core-\/js` version, by default -\/ the latest}
\DoxyCodeLine{\});}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(targets);}
\DoxyCodeLine{/* =>}
\DoxyCodeLine{\{}
\DoxyCodeLine{  'es.symbol.match-\/all': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.array.unscopables.flat': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.array.unscopables.flat-\/map': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.math.hypot': \{ chrome: '77' \},}
\DoxyCodeLine{  'es.promise.all-\/settled': \{ firefox: '69', ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.promise.finally': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.string.match-\/all': \{ chrome: '77', firefox: '69', ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.string.replace': \{ firefox: '69', ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.float32-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.float64-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.int8-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.int16-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.int32-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.uint8-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.uint8-\/clamped-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.uint16-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.uint32-\/array': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.from': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'es.typed-\/array.of': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'web.dom-\/collections.iterator': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'web.immediate': \{ chrome: '77', firefox: '69', ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'web.url': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'web.url.to-\/json': \{ ios: '12.2-\/12.4' \},}
\DoxyCodeLine{  'web.url-\/search-\/params': \{ ios: '12.2-\/12.4' \}}
\DoxyCodeLine{\}}
\DoxyCodeLine{*/ }

\end{DoxyCode}


Additional API\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{// equals of of the method from the example above}
\DoxyCodeLine{require('core-\/js-\/compat/compat')(\{ targets, filter, version \}); // => \{ list: Array<ModuleName>, targets: \{ [ModuleName]: \{ [EngineName]: EngineVersion \} \} \}}
\DoxyCodeLine{// or}
\DoxyCodeLine{require('core-\/js-\/compat').compat(\{ targets, filter, version \}); // => \{ list: Array<ModuleName>, targets: \{ [ModuleName]: \{ [EngineName]: EngineVersion \} \} \}}
\DoxyCodeLine{}
\DoxyCodeLine{// full compat data:}
\DoxyCodeLine{require('core-\/js-\/compat/data'); // => \{ [ModuleName]: \{ [EngineName]: EngineVersion \} \}}
\DoxyCodeLine{// or}
\DoxyCodeLine{require('core-\/js-\/compat').data; // => \{ [ModuleName]: \{ [EngineName]: EngineVersion \} \}}
\DoxyCodeLine{}
\DoxyCodeLine{// map of modules by `core-\/js` entry points:}
\DoxyCodeLine{require('core-\/js-\/compat/entries'); // => \{ [EntryPoint]: Array<ModuleName> \}}
\DoxyCodeLine{// or}
\DoxyCodeLine{require('core-\/js-\/compat').entries; // => \{ [EntryPoint]: Array<ModuleName> \}}
\DoxyCodeLine{}
\DoxyCodeLine{// full list of modules:}
\DoxyCodeLine{require('core-\/js-\/compat/modules'); // => Array<ModuleName>}
\DoxyCodeLine{// or}
\DoxyCodeLine{require('core-\/js-\/compat').modules; // => Array<ModuleName>}
\DoxyCodeLine{}
\DoxyCodeLine{// the subset of modules which available in the passed `core-\/js` version:}
\DoxyCodeLine{require('core-\/js-\/compat/get-\/modules-\/list-\/for-\/target-\/version')('3.3'); // => Array<ModuleName>}
\DoxyCodeLine{// or}
\DoxyCodeLine{require('core-\/js-\/compat').getModulesListForTargetVersion('3.3'); // => Array<ModuleName> }

\end{DoxyCode}


If you want to add new / update data about modules required for target engines, \href{https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md\#updating-core-js-compat-data}{\texttt{ follow this instruction}}. 