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.0.2 to 0.1.0

10

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

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

},
"scripts": {
"build": "tsc"
},
"author": "Fran Bosquet",

@@ -21,3 +18,6 @@ "license": "ISC",

"typescript": "^5.6.2"
},
"scripts": {
"build": "tsc"
}
}
}

@@ -5,4 +5,19 @@ /**

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

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

error: (...message: unknown[]) => {
console.error('\x1b[31m', ...message, '\x1b[0m')
console.error('\n‼️', pencil.red(...message), '\n')
},

@@ -21,3 +36,3 @@

info: (...message: unknown[]) => {
console.log(...message)
console.log('ℹ️', ...message)
},

@@ -30,3 +45,3 @@

warn: (...message: unknown[]) => {
console.warn('\x1b[33m', ...message, '\x1b[0m')
console.warn('⚠️', pencil.yellow(...message))
},

@@ -39,3 +54,3 @@

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

@@ -48,3 +63,3 @@

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

@@ -59,2 +74,25 @@

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