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

Need a node streams implementation that uses bops #16

Closed
feross opened this issue Nov 17, 2013 · 1 comment
Closed

Need a node streams implementation that uses bops #16

feross opened this issue Nov 17, 2013 · 1 comment
Assignees

Comments

@feross
Copy link
Member

@feross feross commented Nov 17, 2013

By default, browserify's streams implementation uses a fake Buffer object from browserify-buffer that behaves weirdly. We really want it to use bops so it uses the environment's native buffer type.

I think @defunctzombie's approach will work:

  // defunctzombie: https://github.com/alexgorbatchev/node-browser-builtins/tree/master/builtin
  // defunctzombie: take the stream files
  // defunctzombie: stream.js
  // defunctzombie: and the __stream shit
  // defunctzombie: put them all into a repo
  // defunctzombie: maybe called bops-stream I dunno
  // defunctzombie: and update the uses of Buffer('foobar') or whatever to use bops
  // defunctzombie: if the bops was API compatible you could just change require('buffer') to require('bops');
  // feross: right
  // defunctzombie: then in your module just require('bops-stream'); and you will be set
  // feross: and use it in place of require('stream')?
  // defunctzombie: this will be nice since others will be able to use your module too
  // defunctzombie: yep
@ghost ghost assigned feross Nov 17, 2013
@feross

This comment has been minimized.

Copy link
Member Author

@feross feross commented Dec 4, 2013

This is not needed anymore. The approach I used instead was to write native-buffer-browserify which emulates the node Buffer API but is backed by a Uint8Array (native browser buffer). So now we can just use the existing browserify streams implementation and eliminate bops from all the modules that we use. native-buffer-browserify will be merged into browserify soon.

@feross feross closed this Dec 4, 2013
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.