_fails-is-regexp.js 244 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 var MATCH = require('./_wks')('match'); module.exports = function(KEY){ var re = /./; try { '/./'[KEY](re); } catch(e){ try { re[MATCH] = false; return !'/./'[KEY](re); } catch(f){ /* empty */ } } return true; };