regexTester.js 226 B

123456789
  1. 'use strict';
  2. var callBound = require('call-bind/callBound');
  3. var $exec = callBound('RegExp.prototype.exec');
  4. module.exports = function regexTester(regex) {
  5. return function test(s) { return $exec(regex, s) !== null; };
  6. };