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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

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)];
  });