Commit bb08ba7fabe618c5ba831430d5478efdb59be6e5
updated docs
wanderer committed on 12/5/2017, 6:23:46 PMParent: 54caadc458ca1ac4c3d5d42c945f09165d3f15cd
Files changed
README.md | changed |
README.md | ||
---|---|---|
@@ -26,16 +26,20 @@ | ||
26 | 26 … | # API |
27 | 27 … | |
28 | 28 … | ## constructor |
29 | 29 … | |
30 … | +[index.js:8-10](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L8-L10 "Source code on GitHub") | |
31 … | + | |
30 | 32 … | Creates a new instance of a pipe |
31 | 33 … | |
32 | 34 … | **Parameters** |
33 | 35 … | |
34 | -- `buf` **[Buffer](https://nodejs.org/api/buffer.html)** an buffer to start with (optional, default `Buffer.from([])`) | |
36 … | +- `buf` **[Buffer](https://nodejs.org/api/buffer.html)** an optional buffer to start with (optional, default `Buffer.from([])`) | |
35 | 37 … | |
36 | 38 … | ## read |
37 | 39 … | |
40 … | +[index.js:17-21](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L17-L21 "Source code on GitHub") | |
41 … | + | |
38 | 42 … | read `num` number of bytes from the pipe |
39 | 43 … | |
40 | 44 … | **Parameters** |
41 | 45 … | |
@@ -44,12 +48,23 @@ | ||
44 | 48 … | Returns **[Buffer](https://nodejs.org/api/buffer.html)** |
45 | 49 … | |
46 | 50 … | ## write |
47 | 51 … | |
52 … | +[index.js:27-30](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L27-L30 "Source code on GitHub") | |
53 … | + | |
48 | 54 … | Wites a buffer to the pipe |
49 | 55 … | |
50 | 56 … | **Parameters** |
51 | 57 … | |
52 | 58 … | - `buf` **[Buffer](https://nodejs.org/api/buffer.html)** |
53 | 59 … | |
60 … | +## end | |
61 … | + | |
62 … | +[index.js:36-38](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L36-L38 "Source code on GitHub") | |
63 … | + | |
64 … | +Whether or not there is more data to read from the buffer | |
65 … | +returns {Boolean} | |
66 … | + | |
54 | 67 … | # LICENSE |
55 | -[MPL-2.0](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)) | |
68 … | +[MPL-2.0][LICENSE] | |
69 … | + | |
70 … | +[LICENSE]: https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2) |
Built with git-ssb-web