0.3.0 • Published 2 years ago

bun-style v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Console styles for Bun

Type-safe wrapper around ansi-styles, similar to chalk.

Example

You can provide a single style as a string, or multiple as an array of strings to avoid callback hell common with chalk.

import { style } from "bun-style";

console.log(style("Hello world!", ["green", "bold"]))

Also includes a styleLog() utility, which adds sensible spacing by default:

import { styleLog } from "bun-style";

console.log("");
styleLog("Styles testing! ", ["white", "bold"])
styleLog("Running tests...", ["bold", "underline", "grey"])
styleLog("✓ 10 tests passed", ["green"])

/**
 * Equivalent to:
 */
// console.log(
//   "\n\n ",
//   style("Running tests... ", ["bold", "underline", "grey"]),
//   "\n\n ",
//   style("✓ 10 tests passed", ["green"]),
//   "\n\n",
// );

npm.io

0.3.0

2 years ago

0.2.0

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago