{"_id":"console-redirect","_rev":"3-cb2f3bc3e88e12c426bb44a5a2cdbbaf","name":"console-redirect","description":"redirect console methods to streams","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"console-redirect","version":"1.0.0","description":"redirect console methods to streams","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{"is-dom":"^1.0.5","sliced":"^1.0.1"},"devDependencies":{"concat-stream":"^1.5.0","tape":"^4.0.1","through2":"^2.0.0"},"scripts":{"test":"node test.js"},"keywords":["stream","console","monkey","patch","hijack","log","err","errors","error","warn","warning","logs","logging","electron","terminal","shell","std","err","oout","stdout","stderr"],"repository":{"type":"git","url":"git://github.com/mattdesl/console-redirect.git"},"homepage":"https://github.com/mattdesl/console-redirect","bugs":{"url":"https://github.com/mattdesl/console-redirect/issues"},"gitHead":"7613a57f067158cc7d28ea92ad8e82405f663e31","_id":"console-redirect@1.0.0","_shasum":"46afeded2b27fe3590d56690b5d0e883c33b89fb","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"46afeded2b27fe3590d56690b5d0e883c33b89fb","tarball":"https://registry.npmjs.org/console-redirect/-/console-redirect-1.0.0.tgz","integrity":"sha512-qiXgZrW8/JW9UNZbRCQ3XHCZ0P4oLPir3agqxKLkw6+zbyqyT/5uTDren8fqjjmA2YTKcN9h+97cmOz5nUzPSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA5xbJvgHT77+9S6GNi78JAnxldOcd0zp9qI+m/juS31AiEA4MzmJQA/unEV6Upd0LRSrg6XPkS9y/+p9TWb7O8mVaY="}]},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}]}},"readme":"# console-redirect\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nRedirects console methods to the given writable streams. For example, can be used to redirect browser `console` to `process.stdout` and `process.stderr`. \n\n## Install\n\n```sh\nnpm install console-redirect --save\n```\n\n## Example\n\n```js\nvar redirect = require('console-redirect')\n\n// redirect browser's console.log and console.error\n// to the process stdout and stderr, respectively\nredirect(process.stdout, process.stderr)\n```\n\nThe following entry point registers the above, hooking into `process` stdout and stderr:\n\n```js\nrequire('console-redirect/process')\n```\n\n## Usage\n\n[![NPM](https://nodei.co/npm/console-redirect.png)](https://www.npmjs.com/package/console-redirect)\n\n#### `log = redirect([stdout], [stderr], [replace])`\n\nDirects `console` methods to the given `stdout` and `stderr` writable streams (which can be null). \n\nThe `warn` and `error` methods are directed to `stderr`, the rest to `stdout`. \n\nIf `replace` is true (default false), it will not trigger the original method. In the context of a browser, this means it will not print to the terminal.\n\nReturn an object with the function `release`, which can be used to reset the console log methods to their original.\n\n```js\nvar redirect = require('console-redirect')\n\n// listen for stdout\n// ignore stderr\n// do not write native methods\nvar logger = redirect(process.stdout, null, true)\n\n// ... some time later, release it\nlogger.release()\n```\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/console-redirect/blob/master/LICENSE.md) for details.\n","maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2022-06-13T22:02:26.860Z","created":"2015-08-03T01:21:23.040Z","1.0.0":"2015-08-03T01:21:23.040Z"},"homepage":"https://github.com/mattdesl/console-redirect","keywords":["stream","console","monkey","patch","hijack","log","err","errors","error","warn","warning","logs","logging","electron","terminal","shell","std","err","oout","stdout","stderr"],"repository":{"type":"git","url":"git://github.com/mattdesl/console-redirect.git"},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"bugs":{"url":"https://github.com/mattdesl/console-redirect/issues"},"license":"MIT","readmeFilename":"README.md"}