Skip to content

Commit

Permalink
Added usage section.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Aug 10, 2018
1 parent a21e989 commit e00dadc
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Node you, or the users of your libraries are using, use **readable-stream** *onl
As of version 2.0.0 **readable-stream** uses semantic versioning.

v3.x.x of `readable-stream` supports Node 6, 8, and 10, as well as
evergreen browsers and IE 11.
evergreen browsers, IE 11 and latest Safari.

v2.x.x of `readable-stream` supports all Node.js version from 0.8, as well as
evergreen browsers and IE 10 & 11.
Expand All @@ -32,6 +32,28 @@ evergreen browsers and IE 10 & 11.

Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]

# Usage

You can swap your `require('stream')` with `require('readable-stream')`
without any changes, if you are just using one of the main classes and
functions.

```js
const {
Readable,
Writable,
Transform,
Duplex,
pipeline,
finished
} = require('readable-stream')
````

Note that `require('stream')` will return `Stream`, while
`require('readable-stream')` will return `Readable`. We discourage using
whatever is exported directly, but rather use one of the properties as
shown in the example above.

# Streams Working Group

`readable-stream` is maintained by the Streams Working Group, which
Expand Down

0 comments on commit e00dadc

Please sign in to comment.