JS module for sorting a table by column type (text, date, time)