Skip to content

Releases: oskarhane/ascii-data-table

Remove dependency on Ramda

08 Mar 19:32
Compare
Choose a tag to compare

Even though Ramda is a nice library, it's huge. And we don't like huge.

New API and rewrite

20 Nov 13:29
Compare
Choose a tag to compare

Breaking changes

  • New API
    • Removed run
    • Added table(rows, maxColWidth)
    • Added tableFromSerializedData(serializedRows, maxColWidth)
    • Added serializeData(rows)
    • Renamed getMaxColumnWidth -> maxColumnWidth
  • Use JSON.stringify to serialize values - no more lines breaks in the tables.
  • Add two dependencies
    • Ramda - To make code more functional and easier to follow
    • core-js - To use String.repeat so we don't exceed call stack size

Better performance

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.

Production release

16 Feb 21:56
Compare
Choose a tag to compare

This is the first production ready release.