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

use Buffer.isBuffer instead of instanceof #58

Merged
merged 3 commits into from
Aug 4, 2015

Conversation

whyrusleeping
Copy link
Contributor

instanceof doesnt work for browserified code

So I changed this to just use Buffer.isBuffer.

probably could just remove the entire 'isBuffer' module, but I left it to be consistent with the other packages.

@@ -2,6 +2,4 @@ var buf = require('buffer');
var Buffer = buf.Buffer;

// could use Buffer.isBuffer but this is the same exact thing...
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could remove that comment too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah... good point. pushed changes

@yocontra
Copy link
Member

yocontra commented Aug 4, 2015

module.exports = require('buffer').Buffer.isBuffer would probably be cleanest

@whyrusleeping
Copy link
Contributor Author

@contra that looks good to me, pushed that up.

yocontra pushed a commit that referenced this pull request Aug 4, 2015
use Buffer.isBuffer instead of instanceof
@yocontra yocontra merged commit 0d19456 into gulpjs:master Aug 4, 2015
@whyrusleeping
Copy link
Contributor Author

@contra when do you think you could publish a patch version to npm? I understand if you dont want to version bump for such a small change, but it would make my life a little easier as i'm working with browserified vinyl code :)

@yocontra
Copy link
Member

yocontra commented Aug 4, 2015

0.5.1

@jbenet jbenet mentioned this pull request Aug 5, 2015
35 tasks
phated pushed a commit that referenced this pull request Sep 27, 2016
use Buffer.isBuffer instead of instanceof
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