-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: feat: add options.validator, getValidator, setValidator
`Atom.of` now takes an optional `options` dictionary, which accepts a `validator` predicate function that will validate Atom state at initialization, `swap`, and `set`. `validator` is `() => true` by default. An atom's validator function can be also be set after initialization with `setValidator`. And atom's validator can be accessed with `getValidator`.
- Loading branch information
1 parent
80e2dfc
commit 39bf743
Showing
16 changed files
with
683 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.