clivas
Turn your terminal into a canvas.
It is available through npm:
npm install clivas
Usage
It is easy to use
var clivas = ;var frame = 0;;
When you draw something with clivas you can use the format patten to help you
clivas;
If you wanted to inverse a color you would provide the inverse tag
clivas;
The format pattern can also help you add whitespace
clivas; // prints [===> ]
API
-
clivas.clear()
- Clears the screen. If you calledclivas.pin()
it would only clear up until the pin. -
clivas.flush()
- Clears everything below the cursor. -
clivas.pin([lineNumber])
- Only clear to here whenclivas.clear()
is called -
clivas.line(str)
- Write a line (accepts a format string as described above) -
clivas.write(str)
- Same asclivas.line(str)
except it does not add a newline -
clivas.cursor(enable)
- Enable or disable the terminal cursor -
clivas.alias(name, value)
- Add an alias to the format pattern i.e.clivas.alias('link', 'red+underline')
enables you to use{link:http://google.com}
License
MIT