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

alpalog

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alpalog - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

dist/test.d.ts

32

dist/index.d.ts

@@ -6,2 +6,12 @@ /**

/**
* Logs a title message in underlined format.
* @param {...unknown[]} message - The message(s) to log.
*/
title: (...message: unknown[]) => void;
/**
* Logs a subtitle message in italic and underlined format.
* @param {...unknown[]} message - The message(s) to log.
*/
subtitle: (...message: unknown[]) => void;
/**
* Logs an error message in red color.

@@ -37,1 +47,23 @@ * @param {...unknown[]} message - The message(s) to log.

};
export declare const pencil: {
red: (...message: any[]) => string;
green: (...message: any[]) => string;
yellow: (...message: any[]) => string;
blue: (...message: any[]) => string;
magenta: (...message: any[]) => string;
cyan: (...message: any[]) => string;
white: (...message: any[]) => string;
gray: (...message: any[]) => string;
bgRed: (...message: any[]) => string;
bgGreen: (...message: any[]) => string;
bgYellow: (...message: any[]) => string;
bgBlue: (...message: any[]) => string;
bgMagenta: (...message: any[]) => string;
bgCyan: (...message: any[]) => string;
bgWhite: (...message: any[]) => string;
bold: (...message: any[]) => string;
underline: (...message: any[]) => string;
italic: (...message: any[]) => string;
strike: (...message: any[]) => string;
hidden: (...message: any[]) => string;
};

48

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.logger = void 0;
exports.pencil = exports.logger = void 0;
/**

@@ -9,2 +9,16 @@ * Logger utility for different levels of logging.

/**
* Logs a title message in underlined format.
* @param {...unknown[]} message - The message(s) to log.
*/
title: (...message) => {
console.log(exports.pencil.bold('\n ➡ī¸ ', ...message), '\n');
},
/**
* Logs a subtitle message in italic and underlined format.
* @param {...unknown[]} message - The message(s) to log.
*/
subtitle: (...message) => {
console.log(exports.pencil.italic(exports.pencil.underline('➡ī¸ ', ...message)), '\n');
},
/**
* Logs an error message in red color.

@@ -14,3 +28,3 @@ * @param {...unknown[]} message - The message(s) to log.

error: (...message) => {
console.error('\x1b[31m', ...message, '\x1b[0m');
console.error('\nâ€ŧī¸', exports.pencil.red(...message), '\n');
},

@@ -22,3 +36,3 @@ /**

info: (...message) => {
console.log(...message);
console.log('ℹī¸', ...message);
},

@@ -30,3 +44,3 @@ /**

warn: (...message) => {
console.warn('\x1b[33m', ...message, '\x1b[0m');
console.warn('⚠ī¸', exports.pencil.yellow(...message));
},

@@ -38,3 +52,3 @@ /**

whisper: (...message) => {
console.log('\x1b[90m', ...message, '\x1b[0m');
console.log(' ', exports.pencil.gray(...message));
},

@@ -46,3 +60,3 @@ /**

success: (...message) => {
console.log('\x1b[32m', ...message, '\x1b[0m');
console.log('\n✅', exports.pencil.green(...message), '\n');
},

@@ -57,1 +71,23 @@ /**

};
exports.pencil = {
red: (...message) => `\x1b[31m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
green: (...message) => `\x1b[32m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
yellow: (...message) => `\x1b[33m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
blue: (...message) => `\x1b[34m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
magenta: (...message) => `\x1b[35m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
cyan: (...message) => `\x1b[36m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
white: (...message) => `\x1b[37m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
gray: (...message) => `\x1b[90m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bgRed: (...message) => `\x1b[41m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bgGreen: (...message) => `\x1b[42m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bgYellow: (...message) => `\x1b[43m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bgBlue: (...message) => `\x1b[44m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bgMagenta: (...message) => `\x1b[45m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bgCyan: (...message) => `\x1b[46m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bgWhite: (...message) => `\x1b[47m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
bold: (...message) => `\x1b[1m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
underline: (...message) => `\x1b[4m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
italic: (...message) => `\x1b[3m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
strike: (...message) => `\x1b[9m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
hidden: (...message) => `\x1b[8m${message.map(i => i.toString()).join(' ')}\x1b[0m`,
};

5

package.json
{
"name": "alpalog",
"version": "0.1.0",
"version": "0.1.1",
"description": "Another logger",

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

"scripts": {
"build": "tsc"
"build": "tsc",
"test": "pnpm run build && node dist/test.js"
}
}

@@ -10,3 +10,3 @@ /**

title: (...message: unknown[]) => {
console.log('\n➡ī¸', pencil.bold(...message), '\n')
console.log(pencil.bold('\n ➡ī¸ ', ...message), '\n')
},

@@ -19,3 +19,3 @@

subtitle: (...message: unknown[]) => {
console.log(' ➡ī¸', pencil.italic(pencil.underline(...message)))
console.log(pencil.italic(pencil.underline('➡ī¸ ', ...message)), '\n')
},

@@ -52,3 +52,3 @@

whisper: (...message: unknown[]) => {
console.log(pencil.gray(...message))
console.log(' ', pencil.gray(...message))
},

@@ -55,0 +55,0 @@

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