Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 1.19 KB

README.md

File metadata and controls

57 lines (36 loc) · 1.19 KB

@nlbs/kaomoji [ ■_■ ]

Minimalist kaomoji for Nanoo Labs documentation.

Usage

import { log } from "@nlbs/kaomoji";

console.log(`${log.fatal} Database connection lost!`);
// → [ ✖_✖ ] Database connection lost!

console.log(`${log.success} Deploy complete`);
// → [ ^■^ ] Deploy complete

console.log(`${log.idle} Waiting for task`);
// → [ □_□ ] Waiting for task

Or consume the raw JSON in any language:

import kaomoji from "@nlbs/kaomoji/kaomoji.json" with { type: "json" };

kaomoji.fatal.value; // → "[ ✖_✖ ]"
kaomoji.fatal.description; // → "Kernel panic"
import json, urllib.request
data = json.load(open("kaomoji.json"))
print(data["fatal"]["value"])  # [ ✖_✖ ]

Default fallback

Unknown keys return [ ?_? ].

log.unknown; // → "[ ?_? ]"

Reference

See KAOMOJI.md for the full kaomoji reference tables.

Raw data

Consume kaomoji.json from any language, it's the single source of truth. Every entry carries value, category and description. The index.ts wrapper is optional.

Maintained

@aadnanmt | Nanoo Labs Ecosystems.

License

ISC