$.fails-is-regexp.js 245 Bytes Raw Blame History Permalink 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; };