Ascii data table generator in Javascript
Even though Ramda is a nice library, it's huge. And we don't like huge.
run
table(rows, maxColWidth)
tableFromSerializedData(serializedRows, maxColWidth)
serializeData(rows)
getMaxColumnWidth
-> maxColumnWidth
The timing test page test/timing.html
shows the following improvements compared to last release (on my MBP):
╒════════════╤═══════════════╤═══════════════╤════════════╕
│"Browser" │"v1.3.3 (secs)"│"v2.0.0 (secs)"│"Change (%)"│
╞════════════╪═══════════════╪═══════════════╪════════════╡
│"Chrome 54" │0.3 │0.2 │50 │
├────────────┼───────────────┼───────────────┼────────────┤
│"Safari 10" │0.15 │0.05 │300 │
├────────────┼───────────────┼───────────────┼────────────┤
│"Firefox 50"│0.15 │0.07 │200 │
└────────────┴───────────────┴───────────────┴────────────┘
When using the new tableFromSerializedData
regeneration for the same data with a new width skips the serialization step, making it more efficient for every subsequent width change.
This is the first production ready release.