NumberTypedStorage
Provides number-specific utils by extending TypedStorage.
Note
NumberTypedStorage
is subpath exported module. You should use @toss/storage/typed
to use it.
Example
import { NumberTypedStorage } from '@toss/storage/typed';
const count = new NumberTypedStorage('count', { initialValue: 0 });
count.increase(); // 1
count.decrease(); // 0
count.increase(10); // 10
count.decrease(5); // 5