🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

obug

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obug - npm Package Compare versions

Comparing version
1.0.0
to
1.0.2
+2
-0
LICENSE
The MIT License (MIT)
Copyright © 2025-PRESENT Kevin Deng (https://github.com/sxzz)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2018-2021 Josh Junon

@@ -5,0 +7,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

+8
-8
{
"name": "obug",
"version": "1.0.0",
"version": "1.0.2",
"description": "A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.",

@@ -47,8 +47,8 @@ "type": "module",

"devDependencies": {
"@sxzz/eslint-config": "^7.2.10",
"@sxzz/prettier-config": "^2.2.4",
"@sxzz/eslint-config": "^7.3.0",
"@sxzz/prettier-config": "^2.2.5",
"@types/debug": "^4.1.12",
"@types/node": "^24.10.0",
"@vitest/browser-playwright": "^4.0.8",
"@vitest/coverage-v8": "^4.0.8",
"@types/node": "^24.10.1",
"@vitest/browser-playwright": "^4.0.10",
"@vitest/coverage-v8": "^4.0.10",
"bumpp": "^10.3.1",

@@ -59,6 +59,6 @@ "debug": "^4.4.3",

"prettier": "^3.6.2",
"tsdown": "^0.16.2",
"tsdown": "^0.16.5",
"typescript": "^5.9.3",
"vite": "^7.2.2",
"vitest": "^4.0.8"
"vitest": "^4.0.10"
},

@@ -65,0 +65,0 @@ "prettier": "@sxzz/prettier-config",

@@ -34,48 +34,2 @@ # obug

## Refactor Plan
The obug package is currently a direct fork of the debug package with minimal modifications. The following refactor plan outlines the intended changes to be made in future releases.
```ts
import { createDebug, disable, enable, enabled, namespaces } from 'obug'
// Get the currently enabled namespaces
console.log(namespaces())
// createDebug has no extra properties or methods.
const debug = createDebug('my-namespace', {
// All options are optional
useColors: true, // false, true, 'auto'
color: 2, // custom color
// custom formatArgs
formatArgs(args) {},
formatters: {},
// Node.js only
inspectOpts: {},
// custom log
log: console.log,
})
debug('This is a debug message')
console.log(
debug.namespace, // 'my-namespace'
debug.enabled, // Check if enabled
debug.useColors, // true
debug.color, // 2
debug.formatArgs, // custom formatArgs
debug.formatters, // {}
debug.inspectOpts, // {}
debug.log, // implemented log function
)
// Create a sub-namespace, and it will inherit options from the parent debugger
const sub = debug.extend('sub-namespace')
sub('This is a sub-namespace debug message')
console.log(sub.namespace) // 'my-namespace:sub-namespace'
```
For more details, please refer to the [src/types-v2.ts](./src/types-v2.ts).
## Original Authors

@@ -102,5 +56,5 @@

[The MIT License](./LICENSE-original) Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
[The MIT License](./LICENSE) Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
[The MIT License](./LICENSE-original) Copyright (c) 2018-2021 Josh Junon
[The MIT License](./LICENSE) Copyright (c) 2018-2021 Josh Junon

@@ -107,0 +61,0 @@ <!-- Badges -->