Skip to content

Commit

Permalink
refactor: remove usage of _.filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Mar 9, 2024
1 parent 6ad62e4 commit f98d613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema-validator.js
Expand Up @@ -36,7 +36,7 @@ import {formatPath} from './format-path.js';
*/
function doItemValidation(value, schema, path) {
const validators = _.castArray(schema);
const matchedValidators = _.filter(validators, (validator) => validator.test(value));
const matchedValidators = validators.filter((validator) => validator.test(value));

// No one matched, we can stop here and return an error with a proper message.
if (matchedValidators.length === 0) {
Expand Down

0 comments on commit f98d613

Please sign in to comment.