While working on React integration I accidentally push experimental version as latest
tag on NPM. So, I decide to cut of React content from this release and push normal 2.1.0
over expermental one
- update all type parameters from
Type
andKey
to short versionT
&K
- remove
showErrorsAsLogs
property fromIDBOptions
- Important: remove
| void
part from method response types (if this isn't the behavior of the method) and this methods now just throws errors when something is wrong
- remove tests output folder from package build
- fix that types declaration file was not contain in package
- change version tags pattern from
v.2.x.x
tov2.x.x
IDB.js now available via npm
npm install @lr0pb/idb
- fix that
db.get
when call with multiple keys but it is actually 1 key in array return requested item instead return it as alone item in array - rename package's iife build in
/out
fromIDB.worker.js
toIDB.iife.js
As of 2.0.4 onwards package builds publish only on
npm
- fix that
db.onDataUpdate
not call listeners whendelete
anddeleteAll
events happened in the listened store
- fix
db.get
return empty array instead ofundefined
for item that not exist - fix
db.get
for multiple items return only items that exist instead of mixed values array that containsundefined
for keys by which items are not exists - fix
db.getAll
return undefined when store is empty instead of empty array
Breaking changes:
db.setItem
renamed todb.set
db.getItem
renamed todb.get
db.hasItem
renamed todb.has
db.updateItem
renamed todb.update
db.deleteItem
renamed todb.delete
All new methods support second argument
to be an array of items/item keys
to manipulate with mulptiple items inside one transaction
All API
docs now generated from source code by TypeDoc
and live on GitHub Pages
Add tests for most use cases. Its source code available in test/mocha.test.js
Update README.md
file API
section generation. Return boolean
in db.onDataUpdate
that represents is listener was registered or not
Release contains basic functionality like writing and reading items to and from database
db.setItem
db.getItem
db.getAll
db.hasItem
db.updateItem
Also some additional useful things:
- callback for
db.getAll
function for progressivelly read all items from store - set listeners for data updates in stores via
db.onDataUpdate