Belphemur / node-json-db

A simple "database" that use JSON file for Node.JS.
MIT License
791 stars 66 forks source link

Add localestorage support #22

Open Belphemur opened 8 years ago

Belphemur commented 8 years ago

To be able to use it in browser easily and rely on the storage mechanism there.

ZaneHannanAU commented 7 years ago

Currently not possible without a rework (requires('') compatibility required for current implementation).

I'm working on it though, as one with Promises.

Not published, but see https://github.com/ZaneHannanAU/db-dot-json for more information.

Belphemur commented 7 years ago

@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).

ZaneHannanAU commented 7 years ago

@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.

Belphemur commented 7 years ago

@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...

Drarig29 commented 4 years ago

@Belphemur I think an easier solution would be to:

I can do it in a PR... I need this feature 😁