@railway-ts/pipelines 0.1.22 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -185,6 +185,13 @@ function validate(value, validator, pathOrOptions = [], maybeOptions) {
185
185
  }
186
186
  return validator(value, path);
187
187
  }
188
+ function is(value, validator) {
189
+ const result = _withAbortEarly(true, () => validator(value));
190
+ if (result instanceof Promise) {
191
+ return result.then((r) => r.ok);
192
+ }
193
+ return result.ok;
194
+ }
188
195
  function formatErrors(errors) {
189
196
  return errors.reduce(
190
197
  (acc, error) => {
@@ -1009,6 +1016,7 @@ exports.finite = finite;
1009
1016
  exports.formatErrors = formatErrors;
1010
1017
  exports.futureDate = futureDate;
1011
1018
  exports.integer = integer;
1019
+ exports.is = is;
1012
1020
  exports.literal = literal;
1013
1021
  exports.matches = matches;
1014
1022
  exports.max = max;