New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bunyamin

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunyamin - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

dist/is-debug/createIsDebug.d.ts

4

dist/index.d.ts

@@ -0,1 +1,2 @@

import type { BunyanLikeLogger } from './decorator';
import { Bunyamin } from './decorator';

@@ -6,3 +7,4 @@ export * from './noopLogger';

export * from './wrapLogger';
declare const _default: Bunyamin<import("./noopLogger").NoopLogger>;
export * from './is-debug';
declare const _default: Bunyamin<BunyanLikeLogger>;
export default _default;

@@ -1160,2 +1160,29 @@ (function (global, factory) {

function createIsDebug(namespaces) {
const skips = [];
const names = [];
for (const part of namespaces.split(/[\s,]+/)) {
if (!part) {
continue;
}
const destination = part[0] === '-' ? skips : names;
const pattern = part.replace(/^-/, '').replace(/\*/g, '.*?');
destination.push(new RegExp(`^${pattern}$`));
}
return function isDebug(name) {
if (name[name.length - 1] === '*') {
return true;
}
if (skips.some(regex => regex.test(name))) {
return false;
}
if (names.some(regex => regex.test(name))) {
return true;
}
return false;
};
}
const isDebug = createIsDebug(process.env.DEBUG || '');
var index = new Bunyamin({

@@ -1167,2 +1194,3 @@ logger: noopLogger()

exports["default"] = index;
exports.isDebug = isDebug;
exports.noopLogger = noopLogger;

@@ -1169,0 +1197,0 @@ exports.traceEventStream = traceEventStream;

{
"name": "bunyamin",
"version": "1.2.0",
"version": "1.3.0",
"description": "Bunyan-based logger for Node.js supporting Trace Event format",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -0,1 +1,2 @@

import type { BunyanLikeLogger } from './decorator';
import { Bunyamin } from './decorator';

@@ -8,3 +9,4 @@ import { noopLogger } from './noopLogger';

export * from './wrapLogger';
export * from './is-debug';
export default new Bunyamin({ logger: noopLogger() });
export default new Bunyamin<BunyanLikeLogger>({ logger: noopLogger() });

Sorry, the diff of this file is not supported yet

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