-
Notifications
You must be signed in to change notification settings - Fork 5
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
What can we expect when we call get with a non-exist key? #3
Comments
The newest version, |
Thanks for the fix! However, I found the current version of the code returns And also, I believe we should change the return type from |
Add a unit test for get() with non-exist-key (#3)
|
I found the
snapDb.get('non-exist-key')
will return a string:Which is not expected from my code.
I believe it could be better if returns an
undefined
.I write a unit test for it, and it can not pass with the head of the master branch code.
Could you please explain that what's the expected behavior of the
get
method, and what should I do if I want to know whether mykey
exists in the snapDb?Thanks!
The text was updated successfully, but these errors were encountered: