regex-check.js 221 B

123456789101112
  1. 'use strict'
  2. var fromCharCode = require('../constant/from-char-code.js')
  3. function regexCheck(regex) {
  4. return check
  5. function check(code) {
  6. return regex.test(fromCharCode(code))
  7. }
  8. }
  9. module.exports = regexCheck