From de2d4650b1ac536c7393ec2dadaf979ed3eb814f Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 14 Jun 2020 02:53:48 +0200 Subject: [PATCH] Revert "Add callIfNull support" This reverts commit ddeeb380a7220c8a502e219c9bf243333c5a7771. --- index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/index.js b/index.js index 5482d6e..e3d7a13 100644 --- a/index.js +++ b/index.js @@ -5,13 +5,9 @@ const combinator = require("@validatem/combinator"); // TODO: Document that this *exposes* context module.exports = function dynamic(ruleGenerationFunction) { - let validator = combinator((value, applyValidators, context) => { + return combinator((value, applyValidators, context) => { let rules = ruleGenerationFunction(value, context); return applyValidators(value, rules); }); - - validator.callIfNull = true; - - return validator; };