版博士V2.0程序
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

README.md 1.2 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. [travis-image]: https://img.shields.io/travis/feross/simple-concat/master.svg
  3. [travis-url]: https://travis-ci.org/feross/simple-concat
  4. [npm-image]: https://img.shields.io/npm/v/simple-concat.svg
  5. [npm-url]: https://npmjs.org/package/simple-concat
  6. [downloads-image]: https://img.shields.io/npm/dm/simple-concat.svg
  7. [downloads-url]: https://npmjs.org/package/simple-concat
  8. [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
  9. [standard-url]: https://standardjs.com
  10. ### Super-minimalist version of [`concat-stream`](https://github.com/maxogden/concat-stream). Less than 15 lines!
  11. ## install
  12. ```
  13. npm install simple-concat
  14. ```
  15. ## usage
  16. This example is longer than the implementation.
  17. ```js
  18. var s = new stream.PassThrough()
  19. concat(s, function (err, buf) {
  20. if (err) throw err
  21. console.error(buf)
  22. })
  23. s.write('abc')
  24. setTimeout(function () {
  25. s.write('123')
  26. }, 10)
  27. setTimeout(function () {
  28. s.write('456')
  29. }, 20)
  30. setTimeout(function () {
  31. s.end('789')
  32. }, 30)
  33. ```
  34. ## license
  35. MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).