How to use the ow.isValid function in ow

To help you get started, we’ve selected a few ow 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 BoostIO / / src / lib / utils / predicates.spec.ts View on Github external
it('validates with nested schema', () => {
    const predicate = schema({
      parent: schema({
        stringProp: ow.string

    const result = ow.isValid({ parent: {} } as unknown, predicate)

github BoostIO / / src / lib / utils / predicates.ts View on Github external
export function isValid(
  value: any,
  predicate: BasePredicate
): value is T {
  return ow.isValid(value, predicate)


Function argument validation for humans

Latest version published 17 days ago

Package Health Score

80 / 100
Full package analysis