Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we do ready() implicitly? #2

Closed
huan opened this issue Aug 13, 2019 · 3 comments
Closed

Can we do ready() implicitly? #2

huan opened this issue Aug 13, 2019 · 3 comments

Comments

@huan
Copy link
Contributor

huan commented Aug 13, 2019

I understand that we need some initialization tasks before the db will be ready to use, so the code in the ready() is necessary.

However, the current design will force the user to call ready() before using the SnapDb, which I believe can be done inside the library itself.

I will get wrong with the following code:

const db = new SnapDb()
// await db.ready()
await db.put('a','b')

I would love to get it to work without the ready() call.

only-cliches pushed a commit that referenced this issue Aug 14, 2019
@only-cliches
Copy link
Owner

This feature will be live in version 1.1.2

@huan
Copy link
Contributor Author

huan commented Aug 14, 2019

Thank you very much for your improvement!

It will help me to solve my problems inside my library, cheers!

@only-cliches
Copy link
Owner

1.1.2 is now live on NPM, this issue has been resolved. Feel free to comment if you find anything further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants