`writeAnsi` is a convenient function that automatically encodes text and
automatically adds a reset.
`writeAnsiU` is a unary function that takes in an array of Uint8Arrays
and keys for ANSI_BUFFERS. There is no automatic text encoding, so an
`ansiText` function has been added. There is also no automatic reset.
This allows the function's logic to be simpler, resulting in 3-4 times
performance increase per Windows benchmarking. It is also more flexible
for complex formatting scenarios.
Both functions convienently allow strings that are keys of ANSI_BUFFERS
to be passed, and these are auto-matched. Both functions return a
Promise<number>, allowing for maximum performance but necessitating
error handling on the part of the consumer.
It is also important to `await` these functions when calling in a
specific order. This is an advantage of `writeAnsiU`, which allows for
longer, more complex prints in a single function call.
The best way to get type saftey with composition functions is via
overloading. This does impose a hard limit on the humber of functions
that can be composed. In this case, the limit is 10.