Comparing version 1.1.0 to 1.1.1
@@ -11,5 +11,5 @@ /// <reference types="debug" /> | ||
} | ||
export declare function createLogger(ns: string, context?: string): Logger; | ||
export declare function getLogger(ns: string, context?: string): Logger; | ||
export declare function namespaces(): string[]; | ||
export declare function cb(ns?: string): ((err: any, data?: any) => void); | ||
export declare function promise(p: PromiseLike<any>, ns?: string): PromiseLike<any>; |
@@ -6,3 +6,3 @@ "use strict"; | ||
const __loggers = {}; | ||
function createLogger(ns, context) { | ||
function getLogger(ns, context) { | ||
let cacheKey = context ? `${ns}@@${context}` : ns; | ||
@@ -48,3 +48,3 @@ if (!__loggers[cacheKey]) { | ||
} | ||
exports.createLogger = createLogger; | ||
exports.getLogger = getLogger; | ||
function namespaces() { | ||
@@ -55,3 +55,3 @@ return Object.keys(__namespaces); | ||
function cb(ns = '') { | ||
const l = createLogger(ns); | ||
const l = getLogger(ns); | ||
return (err, data) => { | ||
@@ -68,3 +68,3 @@ if (err) { | ||
function promise(p, ns = '') { | ||
const l = createLogger(ns); | ||
const l = getLogger(ns); | ||
return p.then(function (data) { | ||
@@ -71,0 +71,0 @@ l.info(data); |
{ | ||
"name": "debuggo", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "General purpose debug library based on visionmedia/debug", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9277