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

carbonate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carbonate

colourful sprintf

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

carbonate

🎨 colourful sprintf

Made with ❤ at @outlandish

npm version js-standard-style

sprintf('I do not like %s(green) and ham.', 'green eggs')
sprintf('I do not like them, %s(yellow.bold.underline).', 'Sam-I-am')

🍪 Give some colour to your sprintf strings with chalk.

✨ Written for ES2015 environments.

👉 Use your preferred bundler and transpiler as required.

Install

npm install --save carbonate
yarn add carbonate

Import

// ES2015
import sprintf from 'carbonate'
// CommonJS
var sprintf = require('carbonate')

Usage

sprintf(str[, ...values]) : String

Format a string with values.

  • str {String} The string to format
  • [values] {Any} Values to interpolate

Returns a string.

Examples:

// simple colour
sprintf('I do not like %s(green) and ham.', 'green eggs')

// use chalk's chaining for bold, etc.
sprintf('I do not like them, %s(yellow.bold.underline).', 'Sam-I-am')

sprintf.log(str[, ...values])

Format and console.log a string.

  • str {String} The string to format
  • [values] {Any} Values to interpolate

Type specifiers

All specifiers in sprintf.js are available.

Contributing

All pull requests and issues welcome!

If you're not sure how, check out the great video tutorials on egghead.io!

License

MIT © Sam Gluck

Keywords

FAQs

Package last updated on 06 May 2017

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