Generate Ascii tables in Javascript

In the graph database Neo4j:s client, called Neo4j Browser, we present the result of
a query in a few different ways since our users have different methods of interpreting
the data.
Some might want to see visual patterns, so there’s a graph visualization for them:
graph viz

Some might just want to get a fast overview of what returned, so there’s a html rows view:
rows

It’s not uncommon for users to want to copy the result and paste it in Slack, a bug report, an email
etc, so we have provided a ascii version of the rows view:
ascii

What’s cool in this ascii version is that we added the ability to dynamically change the maximum
column width of the table. As you can see in the screenshot above the text is wrapped after a certain
number of characters.
We added a slider so you can change that so it fits your medium where it’s going to be pasted.
ascii-slider

The old code for this was pretty bad and had a few bugs so I decided to refactor that code.
While ding that I also decided to release it as a npm and bower module so we can pull it in to our client
as a dependency.

The refactored code have a functional approach is just over 100 lines long, which is really nice.
See the source: Source file

I really enjoyed writing the tests for this module since it’s very visually pleasing: Tests file

The Github repo can be found here: https://github.com/oskarhane/ascii-data-table
The npm module can be found here: https://www.npmjs.com/package/ascii-data-table

btw, here’s a copied result from the ascii table:

+================+======+================================+=================+
|reviewer        |rating|summary                         |movie            |
+================+======+================================+=================+
|Jessica Thompson|92    |You had me at Jerry             |Jerry Maguire    |
+----------------+------+--------------------------------+-----------------+
|Jessica Thompson|65    |Silly, but fun                  |The Replacements |
+----------------+------+--------------------------------+-----------------+
|Angela Scope    |62    |Pretty funny at times           |The Replacements |
+----------------+------+--------------------------------+-----------------+
|James Thompson  |100   |The coolest football movie ever |The Replacements |
+----------------+------+--------------------------------+-----------------+
|Jessica Thompson|45    |Slapstick redeemed only by the R|The Birdcage     |
|                |      |obin Williams and Gene Hackman's|                 |
|                |      | stellar performances           |                 |
+----------------+------+--------------------------------+-----------------+
|Jessica Thompson|85    |Dark, but compelling            |Unforgiven       |
+----------------+------+--------------------------------+-----------------+
|Jessica Thompson|95    |An amazing journey              |Cloud Atlas      |
+----------------+------+--------------------------------+-----------------+
|James Thompson  |65    |Fun, but a little far fetched   |The Da Vinci Code|
+----------------+------+--------------------------------+-----------------+
|Jessica Thompson|68    |A solid romp                    |The Da Vinci Code|
+----------------+------+--------------------------------+-----------------+