Open Belphemur opened 8 years ago
Currently not possible without a rework (requires('')
compatibility required for current implementation).
I'm working on it though, as one with Promise
s.
Not published, but see https://github.com/ZaneHannanAU/db-dot-json for more information.
@ZaneHannanAU Great work on implementing the Promises :)
I admit I gave up on Async as it was overkill for the usage I had of the lib at the time (hence the decision to use Sync filesystem calls).
@Belphemur The biggest issue with mine right now is that it doesn't work at all.
As in, not even the tests work lol
Anyway, once you go promise for one thing; everything else must become a promise.
@ZaneHannanAU Yep, Promises are a double edge sword. One that I didn't wanted to impose on the user.
Also at the time I started the lib, there were easily 5-6 differents promise lib...
@Belphemur I think an easier solution would be to:
null
as a database filename in the JsonDB
constructor)data
(maybe a copy for security concerns)I can do it in a PR... I need this feature 😁
To be able to use it in browser easily and rely on the storage mechanism there.