{"name":"obug","version":"0.0.0","keywords":["debug","log","debugger"],"author":{"url":"https://github.com/qix-","name":"Josh Junon"},"license":"MIT","_id":"obug@0.0.0","maintainers":[{"name":"sxzz","email":"sxzz@sxzz.moe"}],"contributors":[{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},{"url":"http://n8.io","name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Andrew Rhyne","email":"rhyneandrew@gmail.com"}],"homepage":"https://github.com/debug-js/debug#readme","bugs":{"url":"https://github.com/debug-js/debug/issues"},"xo":{"rules":{"import/extensions":"off"}},"dist":{"shasum":"a11543f8a9e022a746e2453dfff40c3a5504353f","tarball":"http://registry-npm.ywwl.com/obug/download/obug-0.0.0.tgz","fileCount":7,"integrity":"sha512-yJoi0z8J4gXOih2J8M2dy1OL5nSiANBqxBla523hR5skerb4fzGPtIyG7WPhTZ4rmj/kryTC43RnTaJE3QdTDw==","signatures":[{"sig":"MEYCIQCQrSwG0KxV16+Mh8ZmFqKYWpcPLiCVRRTEGQdrMIqTnAIhAMUvcwh917m4QomnYMWX0/81HEmYxa0IPDgisXcJDwB4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42791,"size":13486,"noattachment":false,"key":"/obug/-/obug-0.0.0.tgz"},"main":"./src/index.js","_from":"file:obug-0.0.0.tgz","browser":"./src/browser.js","engines":{"node":">=6.0"},"scripts":{"lint":"xo","test":"npm run test:node && npm run test:browser && npm run lint","test:node":"mocha test.js test.node.js","test:browser":"karma start --single-run","test:coverage":"cat ./coverage/lcov.info | coveralls"},"_npmUser":{"name":"sxzz","email":"sxzz@sxzz.moe"},"_resolved":"/private/var/folders/d9/9drlr87n4j904th57x6955l40000gn/T/e419a96836be0dc19dedacf18e036679/obug-0.0.0.tgz","_integrity":"sha512-yJoi0z8J4gXOih2J8M2dy1OL5nSiANBqxBla523hR5skerb4fzGPtIyG7WPhTZ4rmj/kryTC43RnTaJE3QdTDw==","repository":{"url":"git://github.com/debug-js/debug.git","type":"git"},"_npmVersion":"11.6.2","description":"Lightweight debugging utility for Node.js and the browser","directories":{},"_nodeVersion":"24.11.0","dependencies":{"ms":"^2.1.3"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.23.0","brfs":"^2.0.1","karma":"^3.1.4","mocha":"^5.2.0","sinon":"^14.0.0","coveralls":"^3.0.2","browserify":"^16.2.3","karma-mocha":"^1.3.0","karma-browserify":"^6.0.0","mocha-lcov-reporter":"^1.2.0","karma-chrome-launcher":"^2.2.0"},"peerDependenciesMeta":{"supports-color":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/obug_0.0.0_1762883485041_0.17957552387099862","host":"s3://npm-registry-packages-npm-production"},"readme":"# obug\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Unit Test][unit-test-src]][unit-test-href]\n\nA lightweight JavaScript debugging utility, forked from [debug](https://www.npmjs.com/package/debug), featuring TypeScript and ESM support.\n\n> [!NOTE]\n> obug v1 retains most of the compatibility with [debug](https://github.com/debug-js/debug), but drops support for older browsers and Node.js, making it a drop-in replacement.\n>\n> obug v2 refactors some API imports and usage for better support of ESM and TypeScript, easier customization, and an even smaller package size.\n\n## Key Differences from `debug`\n\n- ✨ Minimal footprint\n  - 7.7 kB package size\n  - 1.4 KB minified + gzipped for browsers\n- 📦 Zero dependencies\n- 📝 Full TypeScript support\n- 🚀 Native ESM compatibility\n- 🌐 Optimized for modern runtimes\n  - ES2015+ browsers\n  - Modern Node.js versions\n- 🎨 Customizable formatting\n\n## Installation\n\n```bash\nnpm install obug\n```\n\n## Usage\n\n```ts\nimport { createDebug, disable, enable, enabled, namespaces } from 'obug'\n\n// Get the currently enabled namespaces\nconsole.log(namespaces())\n\nconst debug = createDebug('my-namespace', {\n  // All options are optional\n\n  useColors: true, // false, true, undefined for auto-detect\n  color: 2, // custom color\n  // custom formatArgs\n  formatArgs(args) {},\n  formatters: {},\n  // Node.js only\n  inspectOpts: {},\n\n  // custom log\n  log: console.log,\n})\n\ndebug('This is a debug message')\nconsole.log(\n  debug.namespace, // 'my-namespace'\n  debug.enabled, // Check if enabled\n  debug.useColors, // true\n  debug.color, // 2\n  debug.formatArgs, // custom formatArgs\n  debug.formatters, // {}\n  debug.inspectOpts, // {}\n  debug.log, // implemented log function\n)\n\n// Create a sub-namespace, and it will inherit options from the parent debugger\nconst sub = debug.extend('sub-namespace')\nsub('This is a sub-namespace debug message')\nconsole.log(sub.namespace) // 'my-namespace:sub-namespace'\n```\n\n## Original Authors\n\nAs obug is a fork of debug with significant modifications, we would like to acknowledge the original authors:\n\n- TJ Holowaychuk\n- Nathan Rajlich\n- Andrew Rhyne\n- Josh Junon\n\n## Sponsors\n\n<p align=\"center\">\n  <a href=\"https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg\">\n    <img src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/>\n  </a>\n</p>\n\n## License\n\n[MIT](./LICENSE) License © 2025-PRESENT [Kevin Deng](https://github.com/sxzz)\n\n[The MIT License](./LICENSE) Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\n[The MIT License](./LICENSE) Copyright (c) 2018-2021 Josh Junon\n\n<!-- Badges -->\n\n[npm-version-src]: https://img.shields.io/npm/v/obug.svg\n[npm-version-href]: https://npmjs.com/package/obug\n[npm-downloads-src]: https://img.shields.io/npm/dm/obug\n[npm-downloads-href]: https://www.npmcharts.com/compare/obug?interval=30\n[unit-test-src]: https://github.com/sxzz/obug/actions/workflows/unit-test.yml/badge.svg\n[unit-test-href]: https://github.com/sxzz/obug/actions/workflows/unit-test.yml\n","publish_time":1762883485247,"_cnpm_publish_time":1762883485247,"dist-tags":{"latest":"3.0.0","latest-v1":"1.0.2"}}