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

fix(utils.js): diffs for buffers, issue #1132 #1368

Closed
wants to merge 3 commits into from
Closed

fix(utils.js): diffs for buffers, issue #1132 #1368

wants to merge 3 commits into from

Conversation

a8m
Copy link
Contributor

@a8m a8m commented Sep 22, 2014

see: issue #1132

*/
exports.bufferToJson = function (buf) {
return buf.toJSON
? buf.toJSON(buf)
Copy link
Contributor

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?

Copy link
Contributor

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?

@boneskull
Copy link
Contributor

please add test(s)

@boneskull
Copy link
Contributor

anyway our diffs are pretty lame. I'd be interested in courting a 3p lib to do that

@a8m
Copy link
Contributor Author

a8m commented Sep 29, 2014

@boneskull , I added tests and changed my PR a bit (actually we don't need the .toJSON function).
About your question, .toJSON support v0.9.* and later

@travisjeffery travisjeffery force-pushed the master branch 2 times, most recently from 35c1580 to 64dfc0b Compare October 22, 2014 04:56
@travisjeffery
Copy link
Contributor

lgtm just gonna squash it first

@boneskull
Copy link
Contributor

this is resolved by 7a41fc2

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

Successfully merging this pull request may close these issues.

3 participants