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

advanced-logs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advanced-logs - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

dist/interfaces/config.d.ts

11

dist/index.d.ts

@@ -1,10 +0,1 @@

declare global {
interface Console {
success(message: string, title?: string): void;
error(message: string, title?: string): void;
info(message: string, title?: string): void;
warn(message: string, title?: string): void;
debug(message: string, title?: string): void;
}
}
export {};
export * from '../src/lib/logger';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
const colors_1 = require("./utils/colors");
;
const success = function (message, title) {
const getHours = new Date().getHours().toString().padStart(2, '0');
const getMinutes = new Date().getMinutes().toString().padStart(2, '0');
const getSeconds = new Date().getSeconds().toString().padStart(2, '0');
title = title || 'SUCCESS';
console.log(`${colors_1.Colors.fg.black}${colors_1.Colors.bright}${getHours}:${getMinutes}:${getSeconds} ${colors_1.Colors.fg.green}${colors_1.Colors.bright}${title} ${colors_1.Colors.reset}${message}`);
};
const error = function (message, title) {
const getHours = new Date().getHours().toString().padStart(2, '0');
const getMinutes = new Date().getMinutes().toString().padStart(2, '0');
const getSeconds = new Date().getSeconds().toString().padStart(2, '0');
title = title || 'ERROR';
console.log(`${colors_1.Colors.fg.black}${colors_1.Colors.bright}${getHours}:${getMinutes}:${getSeconds} ${colors_1.Colors.fg.red}${colors_1.Colors.bright}${title} ${colors_1.Colors.reset}${message}`);
};
const info = function (message, title) {
const getHours = new Date().getHours().toString().padStart(2, '0');
const getMinutes = new Date().getMinutes().toString().padStart(2, '0');
const getSeconds = new Date().getSeconds().toString().padStart(2, '0');
title = title || 'INFO';
console.log(`${colors_1.Colors.fg.black}${colors_1.Colors.bright}${getHours}:${getMinutes}:${getSeconds} ${colors_1.Colors.fg.cyan}${colors_1.Colors.bright}${title} ${colors_1.Colors.reset}${message}`);
};
const warn = function (message, title) {
const getHours = new Date().getHours().toString().padStart(2, '0');
const getMinutes = new Date().getMinutes().toString().padStart(2, '0');
const getSeconds = new Date().getSeconds().toString().padStart(2, '0');
title = title || 'WARN';
console.log(`${colors_1.Colors.fg.black}${colors_1.Colors.bright}${getHours}:${getMinutes}:${getSeconds} ${colors_1.Colors.fg.yellow}${colors_1.Colors.bright}${title} ${colors_1.Colors.reset}${message}`);
};
const debug = function (message, title) {
const getHours = new Date().getHours().toString().padStart(2, '0');
const getMinutes = new Date().getMinutes().toString().padStart(2, '0');
const getSeconds = new Date().getSeconds().toString().padStart(2, '0');
title = title || 'DEBUG';
console.log(`${colors_1.Colors.fg.black}${colors_1.Colors.bright}${getHours}:${getMinutes}:${getSeconds} ${colors_1.Colors.fg.blue}${colors_1.Colors.bright}${title} ${colors_1.Colors.reset}${message}`);
};
console.success = success;
console.error = error;
console.info = info;
console.warn = warn;
console.debug = debug;
__exportStar(require("../src/lib/logger"), exports);
{
"name": "advanced-logs",
"version": "2.0.1",
"version": "2.1.0",
"description": "Beautify and modernize console messages.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -15,2 +15,12 @@ ![npm](https://img.shields.io/npm/v/advanced-logs?label=npm&style=for-the-badge)

```js
require('advanced-logs'); // CJS
import 'advanced-logs'; // ESM
console.setConfig({
background: true,
timestamp: false
}); // new | opitonal
console.getConfig(); // new | optional
console.success("Success");

@@ -17,0 +27,0 @@ console.info("Info");

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