{
"repo": "nanodebug",
"timestamp": "2026-01-16T23:56:42.590Z",
"entryPoint": "index.js",
"exports": {
"packageJson": {
"main": "index.js"
}
},
"api": {
"file": "index.js",
"exports": [],
"classes": [],
"functions": []
},
"readme": {
"content": "# nanodebug\n\nA tiny, zero overhead debugging utility.\n\n## Installation\n\n```sh\nnpm install nanodebug\n```\n\n## Usage\n\nBy default, nanodebug is completely noop:\n\n```js\nconst debug = require('nanodebug')()\n\n// Does nothing!\ndebug('You encountered a %s!', '🐛')\n\n// Also does nothing!\ndebug(() => { debug('It accepts functions as well') })\n\n// This... does nothing!\nawait debug(async () => { debug('They can even be async!') })\n```\n\nGo ahead and put some `debug`s in your code and enable nanodebug when :bug: hits the fan:\n\n```js\nconst debug = require('nanodebug')({ enabled: true })\n```\n\nBy default, `debug` will log to stderr using `console.error`, which is also why we were able to specify a formatting string in the examples above. To change this, pass a `log` function in the options:\n\n```js\nconst debug = require('nanodebug')({ log: console.log.bind(console) })\n```\n\nNow, `debug` will instead log to stdout using `console.log`.\n\n## License\n\nApache 2.0\n",
"sections": [
"intro",
"installation",
"usage",
"license"
],
"hasApi": true,
"hasExamples": true,
"exampleCount": 3,
"examples": [
"## Usage\n\nBy default, nanodebug is completely noop:",
"Go ahead and put some `debug`s in your code and enable nanodebug when :bug: hits the fan:",
"By default, `debug` will log to stderr using `console.error`, which is also why we were able to specify a formatting string in the examples above. To change this, pass a `log` function in the options:"
]
},
"patterns": []
}