Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metaory/mini-ansi
🎨 Minimal ANSI color escape utility in under 10 line!
https://github.com/metaory/mini-ansi
ansi color javascript js npm npm-package
Last synced: about 2 months ago
JSON representation
🎨 Minimal ANSI color escape utility in under 10 line!
- Host: GitHub
- URL: https://github.com/metaory/mini-ansi
- Owner: metaory
- License: mit
- Created: 2024-06-18T07:15:29.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-06-18T07:55:35.000Z (3 months ago)
- Last Synced: 2024-07-30T12:56:27.507Z (about 2 months ago)
- Topics: ansi, color, javascript, js, npm, npm-package
- Language: JavaScript
- Homepage: https://npmjs.com/package/mini-ansi
- Size: 256 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mın̶ı AN̶S̶I
minimal ansi escape colors
zero dependencies
---
## DESCRIPTION
Minimal ANSI color escape utility in [under 10 lines](src/index.js)!
---
Usage
-----```sh
# install
npm install mini-ansi
``````js
// const ansi = require('mini-ansi') // CJS
import C from 'mini-ansi' // ESM
const { log } = consolelog(C.f2('green fg'), 'normal text', C.b4(' red bg '))
log('norm', C.f1b3('red fg and yellow bg'), 'orrr', C.b2f6('cyan fg ongreen bg'))
```> [!Caution]
> ONLY SUPPORT base16
>
> - `f` or `b` can come in any order> [!Important]
> NOT_IMPLEMENTED
>
> - color names
> - modifiers
> - background color
> - tag function for template literals
> - chained calls## Why not ...
- [ ] TODO: WRITE REASONS!
---
## License
[MIT](LICENSE)