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

koishi-utils

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koishi-utils - npm Package Compare versions

Comparing version 3.0.3 to 3.1.0

3

dist/logger.d.ts

@@ -13,3 +13,2 @@ /// <reference types="node" />

static formatters: Record<string, (this: Logger, value: any) => string>;
static create(name?: string, showDiff?: boolean): Logger;
static color(code: number, value: any, decoration?: string): string;

@@ -23,3 +22,3 @@ private code;

debug: LogFunction;
private constructor();
constructor(name: string, showDiff?: boolean);
private color;

@@ -26,0 +25,0 @@ private createMethod;

@@ -20,3 +20,3 @@ "use strict";

this.extend = (namespace) => {
return Logger.create(`${this.name}:${namespace}`);
return new Logger(`${this.name}:${namespace}`);
};

@@ -52,2 +52,4 @@ this.format = (...args) => {

};
if (name in instances)
return instances[name];
let hash = 0;

@@ -67,8 +69,2 @@ for (let i = 0; i < name.length; i++) {

}
static create(name = '', showDiff = false) {
const logger = instances[name] || new Logger(name);
if (showDiff !== undefined)
logger.showDiff = showDiff;
return logger;
}
static color(code, value, decoration = '') {

@@ -75,0 +71,0 @@ if (!Logger.options.colors)

@@ -7,3 +7,3 @@ "use strict";

const logger_1 = require("./logger");
const logger = logger_1.Logger.create('observer');
const logger = new logger_1.Logger('observer');
const staticTypes = ['number', 'string', 'bigint', 'boolean', 'symbol', 'function'];

@@ -10,0 +10,0 @@ const builtinClasses = ['Date', 'RegExp', 'Set', 'Map', 'WeakSet', 'WeakMap', 'Array'];

{
"name": "koishi-utils",
"description": "Utilities for Koishi",
"version": "3.0.3",
"version": "3.1.0",
"main": "dist/index.js",

@@ -12,3 +12,3 @@ "typings": "dist/index.d.ts",

"author": "Shigma <1700011071@pku.edu.cn>",
"license": "LGPL-3.0-or-later",
"license": "MIT",
"scripts": {

@@ -15,0 +15,0 @@ "lint": "eslint src --ext .ts",

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