source: node_modules/simple-concat/README.md@ 81bc7da

finki-main main
Last change on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[81bc7da]1# simple-concat [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
2
3[travis-image]: https://img.shields.io/travis/feross/simple-concat/master.svg
4[travis-url]: https://travis-ci.org/feross/simple-concat
5[npm-image]: https://img.shields.io/npm/v/simple-concat.svg
6[npm-url]: https://npmjs.org/package/simple-concat
7[downloads-image]: https://img.shields.io/npm/dm/simple-concat.svg
8[downloads-url]: https://npmjs.org/package/simple-concat
9[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
10[standard-url]: https://standardjs.com
11
12### Super-minimalist version of [`concat-stream`](https://github.com/maxogden/concat-stream). Less than 15 lines!
13
14## install
15
16```
17npm install simple-concat
18```
19
20## usage
21
22This example is longer than the implementation.
23
24```js
25var s = new stream.PassThrough()
26concat(s, function (err, buf) {
27 if (err) throw err
28 console.error(buf)
29})
30s.write('abc')
31setTimeout(function () {
32 s.write('123')
33}, 10)
34setTimeout(function () {
35 s.write('456')
36}, 20)
37setTimeout(function () {
38 s.end('789')
39}, 30)
40```
41
42## license
43
44MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).
Note: See TracBrowser for help on using the repository browser.