How to use the runtypes.String.guard function in runtypes

To help you get started, we’ve selected a few runtypes examples, based on popular ways it is used in public projects.

github Hypercubed / dynamo / benchmarks / runtypes.ts View on Github external
s.bench('createFromGuard String.guard', () => {
    result = [String.guard('hello'), StringType.guard(42)];
  });
});
github Hypercubed / dynamo / benchmarks / runtypes.ts View on Github external
s.bench('runtype String.guard', () => {
    result = [String.guard('hello'), String.guard(42)];
  });