Comparing version 1.13.3 to 1.13.5
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLoggable = void 0; | ||
const nop_1 = __importDefault(require("nop")); | ||
const nop_1 = require("@pipeletteio/nop"); | ||
const getLoggable = (logger) => { | ||
@@ -13,7 +10,7 @@ if (logger) { | ||
return { | ||
error: nop_1.default, | ||
info: nop_1.default, | ||
silly: nop_1.default, | ||
verbose: nop_1.default, | ||
warn: nop_1.default, | ||
error: nop_1.nop, | ||
info: nop_1.nop, | ||
silly: nop_1.nop, | ||
verbose: nop_1.nop, | ||
warn: nop_1.nop, | ||
}; | ||
@@ -20,0 +17,0 @@ }; |
{ | ||
"name": "brolog", | ||
"version": "1.13.3", | ||
"version": "1.13.5", | ||
"description": "Npmlog like logger for Browser", | ||
@@ -49,3 +49,3 @@ "type": "module", | ||
"dependencies": { | ||
"nop": "^1.0.0" | ||
"@pipeletteio/nop": "^1.0.0" | ||
}, | ||
@@ -52,0 +52,0 @@ "devDependencies": { |
@@ -23,2 +23,22 @@ # BROLOG | ||
### Loggable Interface | ||
Brolog implementes [Loggable](https://github.com/huan/brolog/blob/main/src/loggable.ts): | ||
```ts | ||
interface Loggable { | ||
error (moduleName: string, message: string, ...args: any[]): void | ||
warn (moduleName: string, message: string, ...args: any[]): void | ||
info (moduleName: string, message: string, ...args: any[]): void | ||
verbose (moduleName: string, message: string, ...args: any[]): void | ||
silly (moduleName: string, message: string, ...args: any[]): void | ||
} | ||
``` | ||
You can import and use it by: | ||
```ts | ||
import { Loggable } from 'brolog' | ||
``` | ||
## EXAMPLE | ||
@@ -25,0 +45,0 @@ |
@@ -7,7 +7,7 @@ export { VERSION } from './version.js' | ||
const DEFAULT_LEVEL = 'info' | ||
const BROLOG_LEVEL_VAR_NAME = 'BROLOG_LEVEL' | ||
const DEFAULT_LEVEL = 'info' | ||
const BROLOG_LEVEL_VAR_NAME = 'BROLOG_LEVEL' | ||
const BROLOG_PREFIX_VAR_NAME = 'BROLOG_PREFIX' | ||
let level : undefined | string | ||
let level: undefined | string | ||
let debugModule: undefined | string | ||
@@ -14,0 +14,0 @@ |
@@ -1,2 +0,2 @@ | ||
import NOP from 'nop' | ||
import { nop } from '@pipeletteio/nop' | ||
@@ -17,7 +17,7 @@ interface Loggable { | ||
return { | ||
error : NOP, | ||
info : NOP, | ||
silly : NOP, | ||
verbose : NOP, | ||
warn : NOP, | ||
error : nop, | ||
info : nop, | ||
silly : nop, | ||
verbose : nop, | ||
warn : nop, | ||
} | ||
@@ -24,0 +24,0 @@ } |
Sorry, the diff of this file is not supported yet
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
172915
312
2467
+ Added@pipeletteio/nop@^1.0.0
+ Added@pipeletteio/nop@1.0.5(transitive)
- Removednop@^1.0.0
- Removednop@1.0.0(transitive)