Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

w

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

w - npm Package Compare versions

Comparing version
2.1.4
to
2.1.5
+27
-4
lib/w.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.w = exports.namespaces = void 0;
exports.namespaces = void 0;
exports.w = w;
const types_ts_1 = require("./types.js");

@@ -12,4 +13,27 @@ const colours_ts_1 = require("./colours.js");

const debug = types_ts_1.context.console.Console?.(stderr)?.debug || types_ts_1.context.console.debug;
/**
* The underlying namespace manager.
*/
exports.namespaces = new namespacing_ts_1.Namespaces(DEBUG);
const w = (namespace = "") => {
/**
* Create a debug instance for a namespace.
*
* @example
* ```ts
* import { w } from "w";
* const log = w("app");
* log("hello");
* ```
*
* Logging for given namespace is enabled when the `DEBUG` environment variable includes the namespace.
* Multiple namespaces can be enabled by separating them with commas.
*
* ```sh
* DEBUG=app:init,app:auth,server:* bun run app.ts
* ```
*
* @param namespace - The namespace to debug.
* @returns A debug instance.
*/
function w(namespace = "") {
const debugfn = (...args) => {

@@ -30,3 +54,2 @@ if (debugfn.enabled) {

return debugfn;
};
exports.w = w;
}
+1
-1
{
"name": "w",
"version": "2.1.4",
"version": "2.1.5",
"homepage": "https://github.com/feathers-studio/wiretap",

@@ -5,0 +5,0 @@ "repository": {