{"name":"obug","version":"1.0.2","author":{"name":"Kevin Deng","email":"sxzz@sxzz.moe"},"license":"MIT","_id":"obug@1.0.2","maintainers":[{"name":"sxzz","email":"sxzz@sxzz.moe"}],"homepage":"https://github.com/sxzz/obug#readme","bugs":{"url":"https://github.com/sxzz/obug/issues"},"dist":{"shasum":"198dbd7f357bd7a83a34b56849e728c8fae02707","tarball":"http://registry-npm.ywwl.com/obug/download/obug-1.0.2.tgz","fileCount":10,"integrity":"sha512-Q3KPMFHLmJ4KENpj3HNkzU7nngmrgXrr7h19DHx/8+hNAD2St6zzb8Mamfj3VzrVTbjnIyu94WwPBO5yAB+kCQ==","signatures":[{"sig":"MEQCIFlu325FJ1smvdnoR4li8YgxnfpWsItRT6Veqx+ewiXPAiAaRonMv481XkS43idLRzOTOWVRH+K6EDNojkkHYzrRVQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/obug@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21286,"size":7967,"noattachment":false,"key":"/obug/-/obug-1.0.2.tgz"},"main":"./dist/node.js","type":"module","_from":"file:obug-1.0.2.tgz","types":"./dist/browser.d.ts","unpkg":"./dist/browser.min.js","module":"./dist/node.js","exports":{".":{"browser":"./dist/browser.js","default":"./dist/node.js"},"./package.json":"./package.json"},"funding":["https://github.com/sponsors/sxzz","https://opencollective.com/debug"],"scripts":{"dev":"tsdown --watch","lint":"eslint --cache .","play":"vite playground","test":"vitest","build":"tsdown","format":"prettier --cache --write .","release":"bumpp","lint:fix":"pnpm run lint --fix","typecheck":"tsc --noEmit","test:coverage":"vitest --project node --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:280df2e7-b41f-43bd-b495-a0b67a441b9c"}},"jsdelivr":"./dist/browser.min.js","prettier":"@sxzz/prettier-config","_resolved":"/tmp/ef5bb933642b95ec93fff8e981f5ebd4/obug-1.0.2.tgz","_integrity":"sha512-Q3KPMFHLmJ4KENpj3HNkzU7nngmrgXrr7h19DHx/8+hNAD2St6zzb8Mamfj3VzrVTbjnIyu94WwPBO5yAB+kCQ==","repository":{"url":"git+https://github.com/sxzz/obug.git","type":"git"},"_npmVersion":"11.6.2","description":"A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.2.2","bumpp":"^10.3.1","debug":"^4.4.3","eslint":"^9.39.1","tsdown":"^0.16.5","vitest":"^4.0.10","prettier":"^3.6.2","playwright":"^1.56.1","typescript":"^5.9.3","@types/node":"^24.10.1","@types/debug":"^4.1.12","@sxzz/eslint-config":"^7.3.0","@vitest/coverage-v8":"^4.0.10","@sxzz/prettier-config":"^2.2.5","@vitest/browser-playwright":"^4.0.10"},"peerDependencies":{"ms":"^2.0.0"},"peerDependenciesMeta":{"ms":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/obug_1.0.2_1763538159221_0.9843818616676991","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":1763538159421,"_cnpm_publish_time":1763538159421,"dist-tags":{"latest":"3.0.0","latest-v1":"1.0.2"}}