
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
npm i chalky
/ yarn add chalky
Like chalk with fewer features, smaller in size (772 bytes), and self-contained (zero dependencies). Think of chalky
like a 'stripped down', basic version of chalk..
chalky
aims to provide a chalk-like experience, but for the most basic of console color features. Simple and small. 'Cheaply' add color to your console without worrying about the size of node_modules
.
We're not quite hardened chalk, but we're still chalky
:smirk:
const chalky = require('chalky');
console.log(
chalky.italic.bgBlack.red.bold("Lorem ipsum dolor sit amet")
);
const chalky = require('chalky');
// This line..
const a = chalky.red.green.blue.bgRed.bgBlack.bgYellow("Lorem ipsum dolor sit amet");
// ...is equivalent to this line
const b = chalky.blue.bgYellow("Lorem ipsum dolor sit amet");
console.log(`This: ${a}`);
console.log(`Should equal: ${b}`);
const chalky = require('chalky');
// This line..
const a = chalky.red.blue("Lorem ipsum dolor sit amet");
// ...is equivalent to this line
const b = chalky.blue("Lorem ipsum dolor sit amet");
console.log(`This: ${a}`);
console.log(`Should equal: ${b}`);
chalky.rainbow('Some string')
to 'rainbowify' a stringconst chalky = require('chalky');
console.log(
chalky.rainbow("Lorem ipsum dolor sit amet")
);
black
red
green
yellow
blue
magenta
cyan
white
bgBlack
bgRed
bgGreen
bgYellow
bgBlue
bgMagenta
bgCyan
bgWhite
bold
light
italic
underline
blink
inverse
hidden
Two reasons...
I wanted to understand:
chalk.blue('foo');
and chalk.blue.bold('foo');
(.blue
is being used as both a method and getter)While modified, some of the code in this repo may resemble chalk as I followed the same logic.
FAQs
Like chalk.js, but smaller and with fewer features
The npm package chalky receives a total of 8 weekly downloads. As such, chalky popularity was classified as not popular.
We found that chalky demonstrated a not healthy version release cadence and project activity because the last version was released 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.