getItem()
now returns non-nullable type if used with aLocalKey
that hasuseDefaultValue: true
#5
- Improve tree shaking with webpack (https://webpack.js.org/guides/tree-shaking/)
- Improved internal project structure
BREAKING:
- This package is now a pure ESM package. You can no longer use
require()
to import it.
- Feature: custom converters
- Feature: default values
- Bugfixes: cleaned up lots of edge cases
- Add tests
- Deploy via CI
- Add coverage & license badges
BREAKING:
- Use
new LocalKey("smth", 1337)
instead of"smth" as LocalKey<number>
- LocalStorage.key() now requires a sample value as its second parameter
- Trying to store functions will now throw an error, although you shouldn't have done that to begin with
- Add
README.md
- Initial release.