You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

7 years ago
  1. # Destroy
  2. [![NPM version][npm-image]][npm-url]
  3. [![Build status][travis-image]][travis-url]
  4. [![Test coverage][coveralls-image]][coveralls-url]
  5. [![Dependency Status][david-image]][david-url]
  6. [![License][license-image]][license-url]
  7. [![Downloads][downloads-image]][downloads-url]
  8. [![Gittip][gittip-image]][gittip-url]
  9. Destroy a stream.
  10. ## API
  11. ```js
  12. var destroy = require('destroy')
  13. var fs = require('fs')
  14. var stream = fs.createReadStream('package.json')
  15. destroy(stream)
  16. ```
  17. [npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square
  18. [npm-url]: https://npmjs.org/package/destroy
  19. [github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square
  20. [github-url]: https://github.com/stream-utils/destroy/tags
  21. [travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square
  22. [travis-url]: https://travis-ci.org/stream-utils/destroy
  23. [coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square
  24. [coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master
  25. [david-image]: http://img.shields.io/david/stream-utils/destroy.svg?style=flat-square
  26. [david-url]: https://david-dm.org/stream-utils/destroy
  27. [license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square
  28. [license-url]: LICENSE.md
  29. [downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square
  30. [downloads-url]: https://npmjs.org/package/destroy
  31. [gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
  32. [gittip-url]: https://www.gittip.com/jonathanong/