You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
var prop = require('./prop') |
|
|
|
function id (e) { return e } |
|
|
|
module.exports = function tester (test) { |
|
return ( |
|
'object' === typeof test && 'function' === typeof test.test //regexp |
|
? function (data) { return test.test(data) } |
|
: prop (test) || id |
|
) |
|
}
|
|
|