Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
The figures npm package provides a set of unicode symbols with fallbacks to ASCII characters for better compatibility across different platforms. It allows developers to enhance the visual appeal and readability of their console output without worrying about cross-platform issues.
Cross-platform symbols
This feature allows the use of symbols like ticks and crosses, with automatic fallbacks to simpler ASCII characters on platforms that do not support the more complex unicode symbols. The code sample demonstrates how to use the tick and cross symbols.
"use strict";\nconst figures = require('figures');\nconsole.log(figures.tick, figures.cross);
Customizable symbol fallbacks
Developers can customize the fallbacks for symbols, providing an alternative character for environments that do not support the default unicode symbol. This code sample shows how to replace the default tick symbol with a custom character.
"use strict";\nconst figures = require('figures');\nfigures.replace({ tick: '√' });\nconsole.log(figures.tick);
Chalk is a popular npm package for styling terminal strings. While it focuses on adding color and style to text, figures focuses on providing cross-platform symbols. Both packages enhance the visual output of console applications but in different aspects.
The emoji package allows for the inclusion of emojis in Node.js applications. Similar to figures, it enhances the visual aspect of console output but does so through emojis rather than symbols. Figures provides a more subtle way of enhancing output with symbols that have fallbacks for better compatibility.
Unicode symbols with Windows CMD fallbacks
Windows CMD only supports a limited character set.
$ npm install --save figures
See the source for supported symbols.
const figures = require('figures');
console.log(figures.tick);
// On real OSes: ✔︎
// On Windows: √
MIT © Sindre Sorhus
FAQs
Unicode symbols with fallbacks for older terminals
The npm package figures receives a total of 6,942,624 weekly downloads. As such, figures popularity was classified as popular.
We found that figures 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.