0.4.1 • Published 3 years ago

@dotto.x/validator v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

dotto.x/validator

Validate all write operation with minimalistic interface

import { createStore } from 'dotto.x'
import { validator } from '@dotto.x/validator'

let testingStore = createStore({ test: 1 })

let { errors, destroy, valid } = validator(testingStore, [
  {
    path: 'test',
    validators: [value => (value > 1 ? 'too much' : false)]
  }
])

valid.subscribe(isValid => {})
errors.subscribe({test} => {})
0.4.1

3 years ago

0.4.0

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago