-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
get code coverage up to 100% #53
Conversation
, createRBT = require('functional-red-black-tree') | ||
, globalStore = {} | ||
|
||
function toKey (key) { | ||
return typeof key == 'string' ? '$' + key : JSON.stringify(key) | ||
return '$' + key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would remove support for objects as keys, right? like the key would then just always be $[object Object]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, this is actually only used for database names. So you'd no longer be able to do new MemDOWN({'foo': 'bar'})
although I doubt anyone was doing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I guess it may technically be a breaking change, although I've never heard of this feature being documented anywhere in the level ecosystem (levelup({foo: 'bar'})
?) so I'd consider it dubious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ok understood. then let's rename this function, so it's more clear for the next reader? what about something like toLocation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or just inline that code, it's not complex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can inline it, yeah.
thank you for your work on this! |
45407b4
to
cc7829c
Compare
Added @juliangruber's suggestions and removed the |
localtunnel is not having a good day today, which is why the tests keep failing. will wait for a green tho |
I have restarted this like 10 times and localtunnel still keeps failing. 😕 |
wooooooot |
There were just a few changes necessary to get it to 100%. Also there was quite a bit of dead code.