{
  "manifest": {
    "name": "destroy",
    "description": "destroy a stream if possible",
    "version": "1.2.0",
    "author": {
      "name": "Jonathan Ong",
      "email": "me@jongleberry.com",
      "url": "http://jongleberry.com"
    },
    "contributors": [
      {
        "name": "Douglas Christopher Wilson",
        "email": "doug@somethingdoug.com"
      }
    ],
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "https://github.com/stream-utils/destroy.git"
    },
    "devDependencies": {
      "eslint": "7.32.0",
      "eslint-config-standard": "14.1.1",
      "eslint-plugin-import": "2.25.4",
      "eslint-plugin-node": "11.1.0",
      "eslint-plugin-promise": "5.2.0",
      "eslint-plugin-standard": "4.1.0",
      "mocha": "9.2.2",
      "nyc": "15.1.0"
    },
    "engines": {
      "node": ">= 0.8",
      "npm": "1.2.8000 || >= 1.4.16"
    },
    "scripts": {
      "lint": "eslint .",
      "test": "mocha --reporter spec",
      "test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
      "test-cov": "nyc --reporter=html --reporter=text npm test"
    },
    "files": [
      "index.js",
      "LICENSE"
    ],
    "keywords": [
      "stream",
      "streams",
      "destroy",
      "cleanup",
      "leak",
      "fd"
    ],
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-destroy-1.2.0-4803735509ad8be552934c67df614f94e66fa015-integrity/node_modules/destroy/package.json",
    "readmeFilename": "README.md",
    "readme": "# destroy\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][github-actions-ci-image]][github-actions-ci-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\nDestroy a stream.\n\nThis module is meant to ensure a stream gets destroyed, handling different APIs\nand Node.js bugs.\n\n## API\n\n```js\nvar destroy = require('destroy')\n```\n\n### destroy(stream [, suppress])\n\nDestroy the given stream, and optionally suppress any future `error` events.\n\nIn most cases, this is identical to a simple `stream.destroy()` call. The rules\nare as follows for a given stream:\n\n  1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()`\n     and add a listener to the `open` event to call `stream.close()` if it is\n     fired. This is for a Node.js bug that will leak a file descriptor if\n     `.destroy()` is called before `open`.\n  2. If the `stream` is an instance of a zlib stream, then call `stream.destroy()`\n     and close the underlying zlib handle if open, otherwise call `stream.close()`.\n     This is for consistency across Node.js versions and a Node.js bug that will\n     leak a native zlib handle.\n  3. If the `stream` is not an instance of `Stream`, then nothing happens.\n  4. If the `stream` has a `.destroy()` method, then call it.\n\nThe function returns the `stream` passed in as the argument.\n\n## Example\n\n```js\nvar destroy = require('destroy')\n\nvar fs = require('fs')\nvar stream = fs.createReadStream('package.json')\n\n// ... and later\ndestroy(stream)\n```\n\n[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/destroy\n[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square\n[github-url]: https://github.com/stream-utils/destroy/tags\n[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master\n[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square\n[license-url]: LICENSE.md\n[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/destroy\n[github-actions-ci-image]: https://img.shields.io/github/workflow/status/stream-utils/destroy/ci/master?label=ci&style=flat-square\n[github-actions-ci-url]: https://github.com/stream-utils/destroy/actions/workflows/ci.yml\n",
    "licenseText": "\nThe MIT License (MIT)\n\nCopyright (c) 2014 Jonathan Ong me@jongleberry.com\nCopyright (c) 2015-2022 Douglas Christopher Wilson doug@somethingdoug.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz",
    "hash": "4803735509ad8be552934c67df614f94e66fa015",
    "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
    "registry": "npm",
    "packageName": "destroy",
    "cacheIntegrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== sha1-SANzVQmti+VSk0xn32FPlOZvoBU="
  },
  "registry": "npm",
  "hash": "4803735509ad8be552934c67df614f94e66fa015"
}