sindresorhus/ow

Object shape validator #92

sindresorhus posted onGitHub

Would be useful to be able to validate the shape of objects, like PropTypes.shape

I imagine it could be like:

ow(input, ow.object.shape({
    color: ow.string,
    height: ow.number.greatherThan(10)
}))

@SamVerschueren @transitive-bullshit Thoughts?


Fund this Issue

$60.00
Rewarded

Rewarded pull request

Recent activities

samverschueren was rewarded by sindresorhus for sindresorhus/ow# 92
about 6 years ago
samverschueren submitted an output to  sindresorhus/ ow# 92
about 6 years ago