https://github.com/75lb/ansi-escape-sequences
A simple, isomorphic library containing all known terminal ansi escape codes and sequences.
https://github.com/75lb/ansi-escape-sequences
ansi-colors ansi-escape-sequences isomorphic javascript javascript-library load-anywhere nodejs terminal
Last synced: 5 months ago
JSON representation
A simple, isomorphic library containing all known terminal ansi escape codes and sequences.
- Host: GitHub
- URL: https://github.com/75lb/ansi-escape-sequences
- Owner: 75lb
- License: mit
- Created: 2014-06-12T14:38:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-12-06T00:12:28.000Z (10 months ago)
- Last Synced: 2025-05-03T15:02:13.435Z (5 months ago)
- Topics: ansi-colors, ansi-escape-sequences, isomorphic, javascript, javascript-library, load-anywhere, nodejs, terminal
- Language: JavaScript
- Homepage:
- Size: 445 KB
- Stars: 66
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.hbs
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.org/package/ansi-escape-sequences)
[](https://www.npmjs.org/package/ansi-escape-sequences)
[](https://github.com/75lb/ansi-escape-sequences/network/dependents?dependent_type=REPOSITORY)
[](https://github.com/75lb/ansi-escape-sequences/network/dependents?dependent_type=PACKAGE)
[](https://github.com/75lb/ansi-escape-sequences/actions/workflows/node.js.yml)
[](https://github.com/feross/standard)# ansi-escape-sequences
A simple library containing all known terminal [ansi escape codes and sequences](http://en.wikipedia.org/wiki/ANSI_escape_code). Useful for adding colour to your command-line output, or building a dynamic text user interface.
## API Reference
{{#module name="ansi-escape-sequences"}}
{{>body~}}
{{>member-index~}}
{{>members~}}
{{/module}}## Load anywhere
This library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.
Node.js:
```js
const ansi = require('ansi-escape-sequences')
```Within Node.js with ECMAScript Module support enabled:
```js
import ansi from 'ansi-escape-sequences'
```Within a modern browser ECMAScript Module:
```js
import ansi from './node_modules/ansi-escape-sequences/dist/index.mjs'
```* * *
© 2014-25 Lloyd Brookes \.
Tested by [test-runner](https://github.com/test-runner-js/test-runner). Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).