Open Eyesonly88 opened 7 years ago
Currently "update/merge" operation is not yet supported, but it's easy to implement by yourself.
You can do a load and then use Object.assign to merge data and then save, or maybe you can split a list into key-id data.
I'll consider to add this update()
feature when I have spare time. And of course PR is highly welcomed.
Thanks for the quick response. Yep, I just implemented update like you said 👍 . I used the spread operator.
Just to confirm, is having a number in the key supported?
You can have number in the key, just not use pure number cause it's really confusing and error-prune.
Awesome thanks 👍. Yep my 🔑 looks like this ThuDec292016
Learnt much from the chat. Thanks @Eyesonly88 and @sunnylqm . I think this issue can be closed, maybe a label "recommendation" added to it right so that it gives way for other issues :smile:
First of all, thank you very much for your amazing library 👍
I've got a question regarding using the
save()
operation. In my use case, I'm saving by key and the key is the date. I want to update therawData
without overriding the existing data.For example:
Is that possible to do currently? or do you recommend a way of achieving this?
One way I thought I can do it is by doing a load of the data first, then appending it manually, then storing it back.
Also as a side note, my keys have numbers in them and it seems to work (you mentioned underscores are not permitted), so I'm guessing using numbers in keys is supported ?