https://github.com/ublib/chainsi
ANSI escape color code generator by property-chaining based API
https://github.com/ublib/chainsi
Last synced: about 1 month ago
JSON representation
ANSI escape color code generator by property-chaining based API
- Host: GitHub
- URL: https://github.com/ublib/chainsi
- Owner: ublib
- License: mit
- Created: 2023-12-16T11:50:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-18T14:57:15.000Z (over 2 years ago)
- Last Synced: 2025-03-11T00:40:53.779Z (about 1 year ago)
- Language: TypeScript
- Size: 41 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chainsi
ANSI escape color code generator by property-chaining based API
status: not published
## Usage
```ts
import { t } from "chainsi";
console.log(`Hello, this is ${t("sample").red.bgGreen.underline.bold.italic._}.`);
console.log(t("bold").bold._);
console.log(t("underline").underline._);
console.log(t("strikethrough").strikethrough._);
console.log(t("hidden").hidden._);
console.log(t("italic").italic._);
console.log(t("dim").dim._);
console.log(t("red").red._);
console.log(t("blue").blue._);
console.log(t("green").green._);
console.log(t("yellow").yellow._);
console.log(t("magenta").magenta._);
console.log(t("cyan").cyan._);
console.log(t("white").white._);
console.log(t("grey").grey._);
console.log(t("black").black._);
console.log(t("bgRed").bgRed._);
console.log(t("bgBlue").bgBlue._);
console.log(t("bgGreen").bgGreen._);
console.log(t("bgYellow").bgYellow._);
console.log(t("bgMagenta").bgMagenta._);
console.log(t("bgCyan").bgCyan._);
console.log(t("bgWhite").bgWhite._);
console.log(t("bgGray").bgGray._);
console.log(t("bgBlack").bgBlack._);
```