'use strict';


module.exports = (columns, column, data, done) => {
    var property = column.property;

    columns.map((column) => {
        column.classes = {};

        return column;
    });

    column.sort = column.sort? -column.sort: 1;
    column.classes = {
        'sort-asc': column.sort === 1,
        'sort-desc': column.sort === -1
    };

    data.sort((a, b) => {
        if(a[property].localeCompare) {
            return a[property].localeCompare(b[property]) * column.sort;
        }

        return (a[property] - b[property]) * column.sort;
    });

    done({
        columns: columns,
        data: data
    });
};

@@ -54,16 +54,24 @@
 ta, done
+, sorter
 ) =%3E %7B%0A 
@@ -77,38 +77,40 @@
     
-var property = column.property
+sorter = sorter %7C%7C defaultSorter
 ;%0A%0A 
@@ -354,24 +354,195 @@
  -1%0A    %7D;%0A%0A
+    sorter(data, column);%0A%0A    done(%7B%0A        columns: columns,%0A        data: data%0A    %7D);%0A%7D;%0A%0Afunction defaultSorter(data, column) %7B%0A    var property = column.property;%0A%0A
     data.sor
@@ -749,72 +749,52 @@
 %7D);%0A
-%0A    done(%7B%0A        columns: columns,%0A        data: data%0A    %7D);%0A%7D
+%7D%0Amodule.exports.defaultSorter = defaultSorter
 ;%0A

Allow sort_column sorter to be swapped