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

tiny-crayon

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-crayon

Terminal string styling

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

tiny-crayon

Terminal string styling

npm i tiny-crayon

image

Usage

const crayon = require('tiny-crayon')

console.log(
  crayon.italic('hey'),
  crayon.underline('hey'),
  crayon.overline('hey'),
  crayon.inverse('hey'),
  crayon.strikethrough('hey')
)

console.log(
  crayon.red(crayon.bold('hey')),
  crayon.red('hey'),
  crayon.redBright('hey'),
  crayon.bgRed('hey'),
  crayon.bgRedBright('hey')
)

console.log(
  crayon.green(crayon.bold('hey')),
  crayon.green('hey'),
  crayon.greenBright('hey'),
  crayon.bgGreen('hey'),
  crayon.bgGreenBright('hey')
)

console.log(
  crayon.blue(crayon.bold('hey')),
  crayon.blue('hey'),
  crayon.blueBright('hey'),
  crayon.bgBlue('hey'),
  crayon.bgBlueBright('hey')
)

console.log(Object.keys(crayon)) // Print all methods

Custom stream

It's only used to check if colors are available on that stream, that's it.
By default it checks on process.stdout which is enough.

const { Crayon } = require('tiny-crayon')
const crayon = new Crayon(process.stderr)
console.error(crayon.green('hey'))

License

MIT

FAQs

Package last updated on 06 Jan 2023

Did you know?

Socket

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.

Install

Related posts

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