You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cvm/lib/validators/one-of.js

8 lines
151 B
JavaScript

'use strict';
module.exports = function createOneOf(validValues) {
return function oneOf(value) {
return (validValues.indexOf(value) !== -1);
}
}