README & API.md: minor edits
This commit is contained in:
parent
9c18fc7055
commit
2209c0ea76
2 changed files with 3 additions and 3 deletions
|
@ -10,10 +10,10 @@ already know most of how to use a `Channel`.
|
||||||
Go's use of channels for concurrency is amazing and with JavaScript's
|
Go's use of channels for concurrency is amazing and with JavaScript's
|
||||||
async/await feature we have the basis for it as well. All that's missing is a
|
async/await feature we have the basis for it as well. All that's missing is a
|
||||||
solid `Channel` type. There are existing libraries but I wanted an idiomatic
|
solid `Channel` type. There are existing libraries but I wanted an idiomatic
|
||||||
`Channel` type that's more simple and minimally-opinionated.
|
`Channel` type that's simple and minimally-opinionated.
|
||||||
|
|
||||||
This document assumes you're familiar with Go's channels and why you'd want to
|
This document assumes you're familiar with Go's channels and why you'd want to
|
||||||
use them. For explanatory background, read my [blog
|
use them. For explanatory background, see my [blog
|
||||||
article](https://www.nodeguy.com/channels-for-javascript/) on the subject.
|
article](https://www.nodeguy.com/channels-for-javascript/) on the subject.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
|
@ -152,7 +152,7 @@ These properties are similar to the equivalently named properties of `Array`.
|
||||||
|
|
||||||
## Channel
|
## Channel
|
||||||
|
|
||||||
### Channel([bufferLength = 0]) -> Channel
|
### Channel([bufferLength]) -> Channel
|
||||||
|
|
||||||
Create a new `Channel` with an optional buffer. This allows an async function
|
Create a new `Channel` with an optional buffer. This allows an async function
|
||||||
to push up to `bufferLength` values before blocking.
|
to push up to `bufferLength` values before blocking.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue