Conversation
There was a problem hiding this comment.
sKey in dbjs is stringified key, logically it's key that should be displayed, but key can be anything (an object, date, function etc). so indeed maybe it's better to inform here with sKey.
Other note. The good convention I saw in some other libraries is to always use double quotes to wrap names in messages. Also to make it more bulletproof it might be wise to use JSON.stringify, so e.g.: "Cannot delete nested object " + JSON.stringify(sKey)
There was a problem hiding this comment.
I didn't check libraries, but in node and in Chrome they are in single quotes, eg:
undefined.test
TypeError: Cannot read property 'test' of undefined
There was a problem hiding this comment.
Sure, still if there's a quote in sKey (that's valid), it may display in unclean way, as e.g. Cannot delete nested object "3fw" sadfadsfa" JSON.stringify will assure that it's one line (even if in key are new line characters, that's also allowed), and that quotes are quoted
There was a problem hiding this comment.
So which ones do you prefer to have?
There was a problem hiding this comment.
We definitely should use JSON.stringify here in all cases
|
Also Travis failed due to too long lines |
|
Fixed the code style issues. |
No description provided.