-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(utils.js): diffs for buffers, issue #1132 #1368
Conversation
*/ | ||
exports.bufferToJson = function (buf) { | ||
return buf.toJSON | ||
? buf.toJSON(buf) |
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.
won't JSON.stringify()
call the toJSON
method of the buf
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.
likewise, in what instance will buf
have a toJSON()
method, or not?
please add test(s) |
anyway our diffs are pretty lame. I'd be interested in courting a 3p lib to do that |
@boneskull , I added tests and changed my PR a bit (actually we don't need the .toJSON function). |
35c1580
to
64dfc0b
Compare
lgtm just gonna squash it first |
this is resolved by 7a41fc2 |
see: issue #1132