-
Notifications
You must be signed in to change notification settings - Fork 68
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
BufferList object check method #48
Comments
Yeah, that's not a terrible idea, although |
rvagg
pushed a commit
that referenced
this issue
Sep 17, 2019
Now you can get a `BufferList` without the `readable-stream` bits for a smaller browser bundle. `bl` now exports 2 classes: 1. `BufferList` 2. `BufferListStream` `BufferListStream` **is the default export** (and so is backwards compatible). i.e. ```js const { BufferListStream } = require('bl') // equivalent to: const BufferListStream = require('bl') ``` I've updated the README to recommend typical use like: ```js const { BufferList } = require('bl') // or const { BufferListStream } = require('bl') ``` Simply `require('bl/BufferList')` in the browser to get **JUST** the `BufferList` class that does not inherit from `Duplex`. Added static function `BufferList.isBufferList(obj)` which checks if the passed object has a `_isBufferList` property (similar to how `Buffer.isBuffer(obj)` works). resolves #48 resolves #70 resolves #71
rvagg
pushed a commit
that referenced
this issue
Sep 19, 2019
Now you can get a `BufferList` without the `readable-stream` bits for a smaller browser bundle. `bl` now exports 2 classes: 1. `BufferList` 2. `BufferListStream` `BufferListStream` **is the default export** (and so is backwards compatible). i.e. ```js const { BufferListStream } = require('bl') // equivalent to: const BufferListStream = require('bl') ``` I've updated the README to recommend typical use like: ```js const { BufferList } = require('bl') // or const { BufferListStream } = require('bl') ``` Simply `require('bl/BufferList')` in the browser to get **JUST** the `BufferList` class that does not inherit from `Duplex`. Added static function `BufferList.isBufferList(obj)` which checks if the passed object has a `_isBufferList` property (similar to how `Buffer.isBuffer(obj)` works). resolves #48 resolves #70 resolves #71
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exposing a static method called
isBufferList
to check whether the list can be helpful since Buffer also hasisBuffer
. Do you think it would be helpful?The text was updated successfully, but these errors were encountered: