checking for the existence of Buffer causes it to exist
See original GitHub issueSome modules check for the existence of Buffer but don’t require it to work. Because the identifier Buffer
is seen by browserify, it becomes bundled. Buffer addes quite a lot of code to a bundle that often isn’t needed. (About 40kB)
An example of this is if you require clone, which checks if Buffer
exists, and therefore causes it to be added to a browserified bundle.
It would be handy to be able to explicitly tag that your module does not require Buffer in the package.json (even if you use the Buffer
identifier in your source) to allow for it to be not added if possible.
Issue Analytics
- State:
- Created 8 years ago
- Comments:27 (12 by maintainers)
Top Results From Across the Web
Chemistry of buffers and buffers in our blood - Khan Academy
Buffer, as we have defined, is a mixture of a conjugate acid-base pair that can resist changes in pH when small volumes of...
Read more >How can I check if a current buffer exists in Emacs?
A new buffer is created if there is no live buffer named name. If name starts with a space, the new buffer does...
Read more >What is a buffer? PreLab 3.5 - ACC Media Streaming
Buffers are extremely important to living organisms because all biochemical processes proceed normally only when the pH remains close to 7. Check your...
Read more >Checking if there exists a buffer whose name starting with a ...
Function try-completion tests whether a given string can be completed against a given set of completions (e.g. strings).
Read more >Blood as a Buffer - Chemistry LibreTexts
In the body, there exists another equilibrium between hydronium and oxygen which involves the binding ability of hemoglobin. An increase in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m in favor of adding a special check for
Buffer.isBuffer()
that doesn’t include all of Buffer. This should live in insert-module-globals.Very nice