Skip to content

Instantly share code, notes, and snippets.

@Qquanwei
Created March 14, 2019 09:32
Show Gist options
  • Save Qquanwei/3f4a77cc463eac81b50bbc27684827e9 to your computer and use it in GitHub Desktop.
Save Qquanwei/3f4a77cc463eac81b50bbc27684827e9 to your computer and use it in GitHub Desktop.
import { of, itShouldProp, large, always } from 'OverAssert'
const data = {
age: 20
};
of(data)
.map(itShouldProp('age', large(10), always('age should large than 10')))
.map(itShouldProp('age', less(80), always('age should less than 80')))
.validation((success, reason) => {
// success = true
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment