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

loglevelnext

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loglevelnext - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3

4

dist/LogLevel.d.ts

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

import { Factory, FactoryLevels } from './MethodFactory';
import { Factory, UnknownFactoryLevels } from './MethodFactory';
import { PrefixFactoryOptions } from './PrefixFactory';

@@ -28,4 +28,4 @@ declare type SomeLevel = number | string;

set level(logLevel: SomeLevel);
get levels(): FactoryLevels;
get levels(): UnknownFactoryLevels;
}
export {};

@@ -5,3 +5,3 @@ import { LogLevel } from './LogLevel';

}
export interface FactoryLevels extends Record<Uppercase<string>, number> {
export interface UnknownFactoryLevels extends Record<Uppercase<string>, number> {
SILENT: number;

@@ -14,3 +14,3 @@ }

levelValid: (level: number | string) => boolean;
levels: FactoryLevels;
levels: UnknownFactoryLevels;
logger: LogLevel;

@@ -21,6 +21,14 @@ make: (methodName: string) => Function;

}
export declare const MethodFactoryLevels: FactoryLevels;
declare const BaseLevels: {
TRACE: number;
DEBUG: number;
INFO: number;
WARN: number;
ERROR: number;
SILENT: number;
};
export declare type MethodFactoryLevels = Lowercase<keyof typeof BaseLevels>;
export declare class MethodFactory implements Factory {
constructor(logger?: LogLevel);
get levels(): typeof MethodFactoryLevels;
get levels(): typeof BaseLevels;
get logger(): LogLevel;

@@ -27,0 +35,0 @@ set logger(logger: LogLevel);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MethodFactory = exports.MethodFactoryLevels = void 0;
exports.MethodFactory = void 0;
const noop = () => { };
const levels = Symbol('log-levels');
const instance = Symbol('log-instance');
exports.MethodFactoryLevels = {
const BaseLevels = {
TRACE: 0,

@@ -18,3 +18,3 @@ DEBUG: 1,

this[instance] = logger;
this[levels] = exports.MethodFactoryLevels;
this[levels] = BaseLevels;
}

@@ -51,3 +51,4 @@ get levels() {

let result = level;
if (typeof result === 'string' && typeof this.levels[result.toUpperCase()] !== 'undefined') {
if (typeof result === 'string' &&
typeof this.levels[result.toUpperCase()] !== 'undefined') {
result = this.levels[result.toUpperCase()];

@@ -54,0 +55,0 @@ }

{
"name": "loglevelnext",
"version": "5.0.2",
"version": "5.0.3",
"description": "A modern logging library for Node.js and modern browsers that provides log level mapping to the console",

@@ -5,0 +5,0 @@ "license": "MPL-2.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