index.js
function toFn (value) {
  if (typeof value === 'function') return value

  var str = Array.isArray(value) ? value : String(value)
  var obj = Object.create(null)

  for (var i = 0; i < str.length; i++) {
    obj[str[i]] = true
  }

  return function (char) {
    return obj[char]
  }
}
function toFn (value) {
  if (typeof value === 'function') return value

  var str = Array.isArray(value) ? value : String(value)
  var obj = Object.create(null)

  for (var i = 0; i < str.length; i++) {
    obj[str[i]] = true
  }

  return function (char) {
    return obj[char]
  }
}
function toFn ( value ) { if ( typeof value === 'function' ) return value var str = Array . isArray ( value ) ? value : String ( value ) var obj = Object . create ( null ) for ( var i = 0 ; i < str . length ; i ++ ) { obj [ str [ i ] ] = true } return function ( char ) { return obj [ char ] } }
Convert the input value to a function.
Convert the input value to a function .