{"name":"obug","version":"0.0.1","author":{"name":"Kevin Deng","email":"sxzz@sxzz.moe"},"license":"MIT","_id":"obug@0.0.1","maintainers":[{"name":"sxzz","email":"sxzz@sxzz.moe"}],"homepage":"https://github.com/sxzz/obug#readme","bugs":{"url":"https://github.com/sxzz/obug/issues"},"dist":{"shasum":"681005666dede25bba5e43697fd81b0831dca74a","tarball":"http://registry-npm.ywwl.com/obug/download/obug-0.0.1.tgz","fileCount":9,"integrity":"sha512-R63N58gE35ShkZCLugZmYXS26KwMw+UmFKfKle7l8YR0v09uSDWTgS0hVovGiknER0dScbz5QRTA0ASucIRSQA==","signatures":[{"sig":"MEUCIF3Fv73pSZwWDlOXEI9iZ1pSZfAaIkGCuN9+oWW8B+bQAiEAxMCt4ywjI8E3+hRBVpSGz71CcDscKdOmkVf16j/JQCI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17670,"size":6415,"noattachment":false,"key":"/obug/-/obug-0.0.1.tgz"},"type":"module","_from":"file:obug-0.0.1.tgz","types":"./dist/browser.d.ts","exports":{".":{"node":"./dist/node.js","default":"./dist/browser.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 && pnpm publish","lint:fix":"pnpm run lint --fix","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sxzz","email":"sxzz@sxzz.moe"},"prettier":"@sxzz/prettier-config","_resolved":"/private/var/folders/d9/9drlr87n4j904th57x6955l40000gn/T/8ea490cd10f20e1f0cec29a48746158c/obug-0.0.1.tgz","_integrity":"sha512-R63N58gE35ShkZCLugZmYXS26KwMw+UmFKfKle7l8YR0v09uSDWTgS0hVovGiknER0dScbz5QRTA0ASucIRSQA==","repository":{"url":"git+https://github.com/sxzz/obug.git","type":"git"},"_npmVersion":"11.6.2","description":"A tiny JavaScript debugging utility forked from debug, with TypeScript and ESM support.","directories":{},"_nodeVersion":"24.11.0","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.2","vitest":"^4.0.8","prettier":"^3.6.2","playwright":"^1.56.1","typescript":"^5.9.3","@types/node":"^24.10.0","@types/debug":"^4.1.12","@sxzz/eslint-config":"^7.2.10","@vitest/coverage-v8":"^4.0.8","@sxzz/prettier-config":"^2.2.4","@vitest/browser-playwright":"^4.0.8"},"peerDependenciesMeta":{"supports-color":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/obug_0.0.1_1762896859913_0.9421551096070957","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":1762896860151,"_cnpm_publish_time":1762896860151,"dist-tags":{"latest":"3.0.0","latest-v1":"1.0.2"}}