{"_id":"filter-console","_rev":"3-b443c5f7644413e950f5808ff05e98e0","name":"filter-console","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"filter-console","version":"0.1.0","description":"Filter out unwanted `console.log()` output","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/filter-console.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["filter","console","console-log","log","logging","exclude","exclusion","devtools","pattern","patterns","test","testing","mock","electron","react","proptypes"],"devDependencies":{"ava":"^0.25.0","sinon":"^6.3.5","xo":"^0.23.0"},"gitHead":"9a3e16aeeb14ffa9a6f1c70a75074458b1d0efd9","bugs":{"url":"https://github.com/sindresorhus/filter-console/issues"},"homepage":"https://github.com/sindresorhus/filter-console#readme","_id":"filter-console@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-4za65Ug7I0hl8rrs67cbEPX82lSPvXkhlq5e1UA/YK1kqg77S/DUUPNlqV7DqmjbgcLCleayiVbpTV+jYPxiiw==","shasum":"e9454e7f72221f5aa67eceb54366bb043e7e5da4","tarball":"https://registry.npmjs.org/filter-console/-/filter-console-0.1.0.tgz","fileCount":4,"unpackedSize":4739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvbRfCRA9TVsSAnZWagAASGoP/RNwydc8dZprZ1Ot5ZH2\n1ehMQDuXco1K04efW42labYYgHYpbx8nqW8Omq2M6EHkFNcNgx6gX4ezIoea\n/3VjGw2C6XXIWKJ89RQ2IJmXIbF9obZDAPvLroAuhDuQkjvxg37xWSn6pJ7J\nlsZ+D1oi69BtTcuyamdn6F3XaODDvExvx8dX7c4tiHTn+Qs/Rl85cL42iqoI\n6Gj85j2qgstHJiGbWCjaSNmBp5fjoqgRu3JCq+KGSwSL62kO6jc8n7ES2uW3\n2WwsusTstMnvhJVeJI9pDFf3ZFXx6Vupfrw5ZPPc9audleZ9Dwdm4Cu/Giid\nDHdjiLjcu+4ElgbWJgJ4zZWW0Ueu2Cy96AYzspYVHjbyDYMkRHEEZYGvwtqc\nQwR2HQqpJpe/ocIGGIwwQUxg/Lt3Wh6xZA4zMgyRFdSztmsStlfToTR8FaWA\n5tSuANAMaUF//aTpjdwhV4pjn274XKgCgNpyb2jy+4YKg9P8O7vhNlZbosKz\nRifbzyQpLUMVqRhzw+o9W9olW7JxgiLIyx30wc+hstu9jZkCCVhiY4U1+nn2\noiiTqyx66fuX1TIznkx+dGHBHIiuKLap6LD93WQ/m7jVjgzkd/vO9NZTnMI1\nLObL8NefkiXg4nugIXoigUjNxPPurk8ixFWfh8YIj8KOAue/UvZdyh9EBLe5\nn9ll\r\n=D0WY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEKLxooKas+ZztiM2KqBxlYBNCWB+8EiIIdrVxFjl1hQIhAIioIeL5gYdpRPCM3OcJNlfAiUVbekBZjKd4YVCNSc6V"}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter-console_0.1.0_1539159134625_0.008626388051265366"},"_hasShrinkwrap":false},"0.1.1":{"name":"filter-console","version":"0.1.1","description":"Filter out unwanted `console.log()` output","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/filter-console.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["filter","console","console-log","log","logging","exclude","exclusion","devtools","pattern","patterns","test","testing","mock","electron","react","proptypes"],"devDependencies":{"@types/node":"^11.13.4","ava":"^1.4.1","sinon":"^7.3.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"111e2ebc24fcb1463880d6988152cdf57ceca3db","bugs":{"url":"https://github.com/sindresorhus/filter-console/issues"},"homepage":"https://github.com/sindresorhus/filter-console#readme","_id":"filter-console@0.1.1","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-zrXoV1Uaz52DqPs+qEwNJWJFAWZpYJ47UNmpN9q4j+/EYsz85uV0DC9k8tRND5kYmoVzL0W+Y75q4Rg8sRJCdg==","shasum":"6242be28982bba7415bcc6db74a79f4a294fa67c","tarball":"https://registry.npmjs.org/filter-console/-/filter-console-0.1.1.tgz","fileCount":5,"unpackedSize":6468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctAB6CRA9TVsSAnZWagAA5vkP/2EDKJzRaqmS0R1DMWAt\nEazpyLE7WWjgQKrvfy/GK6Gk1PrmzqGg8N5xju3ZHRkHVsHPQdjesLMl/sDt\nu5rn5bPmbjGX+ClSRdj4jh2ixOcE327YAvBGgy8MTjkjzGxqZ/gbSqrZ5ZdW\nKjRZAHQVHGXuFmyHnjp0uNNjhH1VRmz/1DtOtA0Zd1Am91SX1uu8SS5ekPRH\nqxMtZdxbM9B65HXaustcd1U0FgM3BLrBQqHTiBv4+pC0/JVjxh3Y05g5dsN/\ngC3CaHqleB372X4xKQPIrBUQKGnFJtywkiDNmBJUVYrJ6+MhD5aZakrkrJG6\nncYMRzYvOP+KuRKV/wWcObvHTIHSzIEDF38Qc03WWIeNRzxHL2bioti6PTTR\n3plvA7tRWXrPoRmLKvkKsuYTwV8Sgu2UzlOBMKQMTh9Nz8+lEjLYjUMekrcr\nzN0bouDhqqZsFcq2c+G3bqnF0AspyuqV2mGBUYKQaGkp9U/sUx07gFBXcRsT\nMTo8OOdOnyi7WkdFiJtVZCCV5nexd5iuxx1tZbOFI70KFsLFOXBBaytuicvF\na/0x+R8NfZ9M9kCewEIxBOvsKJM/eA6298y6eKiHXpLeOZe5teEIWTUVQBRm\nAYH5uJnbs86hvsMS5zUntE88UHZMlRMAJBOkhvTpFuyhFErYKy9U6nKAUxRr\nL0Os\r\n=RBkX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOxMf4Ti6HJtkwnGQsJWWqY4lOWvbgqlUWz08uEGcC4AIhAKGE4s/tA/Ypv4C2txgrejmYrpRGdlZuozbdx6B9jW5g"}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter-console_0.1.1_1555300473389_0.8068607718209646"},"_hasShrinkwrap":false},"1.0.0":{"name":"filter-console","version":"1.0.0","description":"Filter out unwanted `console.log()` output","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/filter-console.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["filter","console","console-log","log","logging","exclude","exclusion","devtools","pattern","patterns","test","testing","mock","electron","react","proptypes"],"devDependencies":{"@types/node":"^16.7.2","ava":"^3.15.0","sinon":"^11.1.2","tsd":"^0.17.0","xo":"^0.44.0"},"gitHead":"4afcef852b828b42b28eebb239ab2655cda8013d","bugs":{"url":"https://github.com/sindresorhus/filter-console/issues"},"homepage":"https://github.com/sindresorhus/filter-console#readme","_id":"filter-console@1.0.0","_nodeVersion":"16.7.0","_npmVersion":"7.20.3","dist":{"integrity":"sha512-ooKeYe/sb/eGlscph0Z10M75sN6ujAcgTnm/Ingb/SKJukbQ2Upae7bjJFGRCZFqFOjY/cSeBQY5r/y4q6WxEQ==","shasum":"f55e38f7c9deed0a962a10765dc374bf2c6cc925","tarball":"https://registry.npmjs.org/filter-console/-/filter-console-1.0.0.tgz","fileCount":5,"unpackedSize":6371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ+eUCRA9TVsSAnZWagAAW+sP/3D22Hey8R8GajqdVH/a\nUvLrAWfsgOnvo4jTwijahVzXb3HS5c9leirQZqEKiFoyUYgvuoEAi/lh+thY\nyykxzWQYIdD+/4yLmzi9rPs9lIGk24NvFCXbYPXKR+VHeI8ira7gmt5hRvfP\nz1z1DDLj7d2IafJxMUlLK/lf78TVyQkvb/mo5WeZOO0YeZU6Td+3Ifq3SDc0\n47X6wQhtjpvPiIlS3bdJhHS3BC3nP1oa9ElRfQr12U45nk9Q9xVNsybDqiF2\n16XN94VPkCmAwVVwBxJVWSXQXFrroQMBaWLYtDoJKr4TX+bDil/ETwURl3X3\nLiZwiBH8Gp3BBwHO8F3w+MD7W23yUqnYhzcni7N2tnJvUon56Wjp5s5aQWRM\nKRxaR2/hJ8IQNWc/cOlDI1yRgAeyTBS85JuSe9rTUzL7Qk+Ztencmq9m1+L+\nrzOttHvzvKIJySML6uRNhzrnGU/Xg7VdTsBsejCgmA8y3+Ef+1JX5nNuTiAA\n7f+zC3P7jb6NNqh2b5PQE6+1zbVAxf9qWunoI0xJWhnlt+U0VH8oMQVgqEwD\nOaYjkkg9Au9pGKhowHmKtk81Y6+4s8lskynRd6uc3qH4i9pR9Ie5hLRkrZfK\nywSjdjHuDlz5q9SAPB/DWtu4u37/pF298qwqliW4yDiQbL6z/mSwM29q5gXB\n5Rpy\r\n=CBkO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZJg8WeBFb2h1KMS7wRPQ++ZussZEsQPms1tx1F2X6jwIgEfCsGytSj+/MI7FCkJ9SlOvmgG59xix8CDAQAYSzLWA="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filter-console_1.0.0_1630005140124_0.4876000760727843"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-10T08:12:14.624Z","0.1.0":"2018-10-10T08:12:14.735Z","modified":"2022-05-02T10:12:30.655Z","0.1.1":"2019-04-15T03:54:33.483Z","1.0.0":"2021-08-26T19:12:20.264Z"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"description":"Filter out unwanted `console.log()` output","homepage":"https://github.com/sindresorhus/filter-console#readme","keywords":["filter","console","console-log","log","logging","exclude","exclusion","devtools","pattern","patterns","test","testing","mock","electron","react","proptypes"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/filter-console.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/filter-console/issues"},"license":"MIT","readme":"# filter-console\n\n> Filter out unwanted `console.log()` output\n\nCan be useful when you don't control the output, for example, filtering out PropType warnings from a third-party React component.\n\n## Install\n\n```\n$ npm install filter-console\n```\n\n## Usage\n\n```js\nimport filterConsole from 'filter-console';\n\nconst disableFilter = filterConsole(['🐼']);\n\nconst log = () => {\n\tconsole.log('');\n\tconsole.log('🦄');\n\tconsole.log('🐼');\n\tconsole.log('🐶');\n};\n\nlog();\n\ndisableFilter();\n\nlog();\n```\n\n```\n$ node example.js\n\n🦄\n🐶\n\n🦄\n🐼\n🐶\n```\n\n## API\n\n### filterConsole(excludePatterns, options?)\n\nReturns a function, which when called, disables the filter.\n\n#### excludePatterns\n\nType: `Array<string | RegExp | Function>`\n\nConsole output that matches any of the given patterns are filtered from being logged. The patterns are matched against what would be logged and not the `console` method input arguments directly. Meaning an exclude pattern of `'foo bar'` will match `console.log('foo %s', 'bar')`.\n\nFilter types:\n- `string`: Checks if the string pattern is included in the console output.\n- `RegExp`: Checks if the RegExp pattern matches the console output.\n- `Function`: Receives the console output as a string and is expected to return a truthy/falsy value of whether to exclude it.\n\n#### options\n\nType: `object`\n\n##### methods\n\nType: `string[]`\\\nDefault: `['log', 'debug', 'info', 'warn', 'error']`\n\nConsole methods to filter.\n\n##### console\n\nType: `object`\\\nDefault: `console`\n\nUse a custom `console` object. Can be useful for testing or mocking.\n","readmeFilename":"readme.md"}