@nwbm/use-changes
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@nwbm/use-changes

Pack of hooks for convenient values comparison.

Installation

npm install @nwbm/use-changes

Available hooks

Execute callback when the given value has changed, accordingly to given comparator logic.

Returns new value of given one only if it has changed, accordingly to given comparator logic.

Calculate new value from given one, based on its current a previous value.

Low-level hook, returning "meta" data about the comparison: current value, previous value, and whether the value has changed.

Package Sidebar

Install

npm i @nwbm/use-changes

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

20.3 kB

Total Files

7

Last publish

Collaborators

  • jeron-diovis