vanillish
v1.0.0
Published
vanillish
Downloads
1
Readme
vanillish
What is it?
A brand new package project! It's a CRUD wrapper around @brightsole/vanillite
.
It has a number of methods that make setting, getting, querying, and deleting data a dream!
It's ready for you to add some functionality, and publish it!
How to use it?
| methodName | args | return |
|--- | --- |--- |
| setItem | StorageItem | Promise(StorageItemWithId) |
| getItem | id | Promise(StorageItemWithId) |
| getAll | none
| Promse([StorageItemWithId]) |
| deleteItem | id | Promise(none
) |
| deleteAll | none
| Promise(none
) |
| query | QueryObject | Promise([StorageItemWithId]) |
TODO:
High priority
- type the query object
- test it
- create
- read
- update
- delete
- very thoroughly test querying, especially deep comparisons like
'dingle.bloop.floobo': ['niner']
- UNBREAK THE STORAGE LIB - we stopped allowing a variable storage lib to screw down the types and get the dep working. I'd like that unbroken so that you could instantiate it with
localforage
to remove the caching, orvanillite
to optimise speed with an in-memory cache
Low priority
- refactor methods to only be CRUD, no named
createAll
, just look at inputs for what to do - allow for querying using regex queryParam properties :sparkles: