1 var fails = require('../internals/fails');
3 var replacement = /#|\.prototype\./;
5 var 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)
13 var normalize = isForced.normalize = function (string) {
14 return String(string).replace(replacement, '.').toLowerCase();
17 var data = isForced.data = {};
18 var NATIVE = isForced.NATIVE = 'N';
19 var POLYFILL = isForced.POLYFILL = 'P';
21 module.exports = isForced;