Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

brolog

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brolog - npm Package Compare versions

Comparing version 1.13.3 to 1.13.5

dist/src/brolog.d.ts

15

dist/cjs/src/loggable.js
"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 @@ };

4

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc