surrender
Draw lines and shapes on the terminal.
examples
rhombus.js
var render =from : -1 1 -1 1;render;
output:
\____
/¯¯¯¯ \____
/¯¯¯¯ \___
/¯¯¯ \____
/¯¯¯¯ \____
/¯¯¯¯ \____
\____ /¯¯¯
\____ /¯¯¯¯
\____ /¯¯¯¯
\____ /¯¯¯¯
\___ /¯¯¯¯
\____ /¯¯¯
methods
var surrender = require('surrender')
var render = surrender(opts)
Create a new surrender object from opts
.
The optional opts.from
specifies a coordinate transform using
coords so you don't need to think in
cursor coordinates.
You can use opts.charm
to pass in a custom
charm instance.
render.line([ x0, y0 ], [ x1, y1 ])
Draw a line from [ x0, y0 ]
to [ x1, y1 ]
.
Returns this
.
install
Using npm do:
npm install surrender
license
MIT/X11