Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('validates with nested schema', () => {
const predicate = schema({
parent: schema({
stringProp: ow.string
})
})
const result = ow.isValid({ parent: {} } as unknown, predicate)
expect(result).toBe(false)
})
})
export function isValid(
value: any,
predicate: BasePredicate
): value is T {
return ow.isValid(value, predicate)
}