source: trip-planner-front/node_modules/core-js/internals/is-forced.js@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 573 bytes
Line 
1var fails = require('../internals/fails');
2
3var replacement = /#|\.prototype\./;
4
5var isForced = function (feature, detection) {
6 var value = data[normalize(feature)];
7 return value == POLYFILL ? true
8 : value == NATIVE ? false
9 : typeof detection == 'function' ? fails(detection)
10 : !!detection;
11};
12
13var normalize = isForced.normalize = function (string) {
14 return String(string).replace(replacement, '.').toLowerCase();
15};
16
17var data = isForced.data = {};
18var NATIVE = isForced.NATIVE = 'N';
19var POLYFILL = isForced.POLYFILL = 'P';
20
21module.exports = isForced;
Note: See TracBrowser for help on using the repository browser.