Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
log-symbols
Advanced tools
The log-symbols package provides a set of symbols for use in console logging, which are especially useful for distinguishing different levels of log messages such as success, info, warning, and error. These symbols are cross-platform and will display correctly on different operating systems, including fallbacks for Windows.
Success Symbol
Displays a green check mark to indicate a successful operation.
const logSymbols = require('log-symbols');
console.log(logSymbols.success, 'Operation successful!');
Info Symbol
Displays a blue 'i' to represent an informational message.
const logSymbols = require('log-symbols');
console.log(logSymbols.info, 'Information message.');
Warning Symbol
Displays a yellow exclamation mark to signal a warning.
const logSymbols = require('log-symbols');
console.log(logSymbols.warning, 'Warning! Something needs attention.');
Error Symbol
Displays a red cross to indicate an error or a problem.
const logSymbols = require('log-symbols');
console.log(logSymbols.error, 'Error! Something went wrong.');
Chalk is a popular package that allows you to style and colorize text in the console. While it doesn't provide symbols, it is often used in conjunction with log-symbols to color the text accompanying the symbols for better visibility and emphasis.
Figures provides a set of unicode symbols that can be used in the console, similar to log-symbols. It includes more symbols than log-symbols, offering a wider variety of icons for different use cases.
Ora is a package that provides elegant terminal spinners. Although its primary feature is different, it includes symbols for success, info, warning, and error, which can be used similarly to log-symbols.
cli-spinners is a collection of spinners for use in the terminal, similar to ora. It also includes some static symbols, but its main focus is on animated spinners for long-running tasks.
Colored symbols for various log levels
Includes fallbacks for Windows CMD which only supports a limited character set.
npm install log-symbols
import logSymbols from 'log-symbols';
console.log(logSymbols.success, 'Finished successfully!');
// Terminals with Unicode support: ✔ Finished successfully!
// Terminals without Unicode support: √ Finished successfully!
FAQs
Colored symbols for various log levels. Example: `✔︎ Success`
The npm package log-symbols receives a total of 30,248,885 weekly downloads. As such, log-symbols popularity was classified as popular.
We found that log-symbols demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.