{"id":23263759,"url":"https://github.com/danielbayley/console-debug","last_synced_at":"2026-05-06T13:03:09.247Z","repository":{"id":142182238,"uuid":"584195814","full_name":"danielbayley/console-debug","owner":"danielbayley","description":"A better console.debug.","archived":false,"fork":false,"pushed_at":"2023-09-29T20:57:14.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T11:53:47.755Z","etag":null,"topics":["console","console-debugger","console-log","console-tool","debug","debugger","debugging","dev","development","env","environment","node","node-js","nodejs","npm","npm-module","npm-package","npmjs","testing"],"latest_commit_sha":null,"homepage":"https://developer.mozilla.org/docs/Web/API/console/debug","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielbayley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"danielbayley","polar":"danielbayley","open_collective":"danielbayley","thanks_dev":"danielbayley","issuehunt":"danielbayley","custom":["https://paypal.me/danieljbayley","https://blockchain.com/btc/address/37rdZq4muDVNJh6jCr4XDXf8X2EFKjL3QQ","https://blockchain.com/eth/address/0x6248B4349e633969376dA20F9C8577530062BE64"]}},"created_at":"2023-01-01T19:32:47.000Z","updated_at":"2023-10-02T09:27:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"eff8a01d-c3fe-4eb4-90c9-207e7eb22af4","html_url":"https://github.com/danielbayley/console-debug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fconsole-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fconsole-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fconsole-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fconsole-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielbayley","download_url":"https://codeload.github.com/danielbayley/console-debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247443141,"owners_count":20939616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","console-debugger","console-log","console-tool","debug","debugger","debugging","dev","development","env","environment","node","node-js","nodejs","npm","npm-module","npm-package","npmjs","testing"],"created_at":"2024-12-19T14:20:08.411Z","updated_at":"2026-05-06T13:03:04.219Z","avatar_url":"https://github.com/danielbayley.png","language":"JavaScript","funding_links":["https://github.com/sponsors/danielbayley","https://polar.sh/danielbayley","https://opencollective.com/danielbayley","https://thanks.dev/danielbayley","https://issuehunt.io/r/danielbayley","https://paypal.me/danieljbayley","https://blockchain.com/btc/address/37rdZq4muDVNJh6jCr4XDXf8X2EFKjL3QQ","https://blockchain.com/eth/address/0x6248B4349e633969376dA20F9C8577530062BE64"],"categories":[],"sub_categories":[],"readme":"[`console`]`.debug`\n===================\nA better `console`[`.debug`]. Only logs if:\n\n* A `DEBUG` [environment variable] is set\n* [`NODE_ENV`] is set to `development`\n* `--debug` or [`--inspect`] is passed on the command line, including from within [`npm`][][`_lifecycle_`][][`script`s]\n* Running in a GitHub [Actions] environment with [`ACTIONS_STEP_DEBUG`] enabled\n\nAlso `export`s the `debug` conditional with these checks.\n\n## Install\n~~~ sh\npnpm add @danielbayley/console-debug --save-dev\n~~~\nThis package is _[ESM]_ [only], and so [requires] _[Node]_ [`\u003e=`]\n[`14.16`] and must be [`import`]ed instead of [`require`]d:\n~~~ json5\n// package.json\n\"type\": \"module\",\n\"engines\": {\n  \"node\": \"\u003e=14.16\"\n},\n~~~\n~~~ js\n//const { console, debug } = require(\"@danielbayley/console-debug\")\nimport { console, debug } from \"@danielbayley/console-debug\"\n~~~\n\nLicense\n-------\n[MIT] © [Daniel Bayley]\n\n[MIT]:                      LICENSE.md\n[Daniel Bayley]:            https://github.com/danielbayley\n\n[`console`]:                https://developer.mozilla.org/docs/Web/API/console\n[`.debug`]:                 https://developer.mozilla.org/docs/Web/API/console/debug\n\n[environment variable]:     https://wikipedia.org/wiki/Environment_variable\n[`NODE_ENV`]:               https://nodejs.dev/en/learn/nodejs-the-difference-between-development-and-production\n[`--inspect`]:              https://nodejs.org/en/docs/guides/debugging-getting-started#enable-inspector\n\n[`npm`]:                    https://npmjs.com\n[`_lifecycle_`]:            https://docs.npmjs.com/cli/v9/using-npm/scripts#current-lifecycle-event\n[`script`s]:                https://docs.npmjs.com/cli/v9/using-npm/scripts\n\n[actions]:                  https://github.com/features/actions\n[`ACTIONS_STEP_DEBUG`]:     https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging\n\n[node]:                     https://nodejs.org\n[requires]:                 https://docs.npmjs.com/cli/v9/configuring-npm/package-json#engines\n[`\u003e=`]:                     https://docs.npmjs.com/cli/v6/using-npm/semver#ranges\n[`14.16`]:                  https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V14.md#14.16.0\n[ESM]:                      https://developer.mozilla.org/docs/Web/JavaScript/Guide/Modules\n[only]:                     https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n[`import`]:                 https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import\n[`require`]:                https://nodejs.org/api/modules.html#requireid\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbayley%2Fconsole-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielbayley%2Fconsole-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbayley%2Fconsole-debug/lists"}