jpgrace/jQuery-dataTables-Currency-Sorting-Plugin — pull request #1 by chrisatomix (2013-10-30 02:08:51+00:00)
Title: Code simplification, removed duplication

This plugin helped me a lot (thanks!), however I noticed most of the code was being repeated so I spent 15 minutes trying to simplify it. It seems to be working correctly, currency sorting works fine & fast on a table with 500 rows (built using a JS array).
Reduced from 47 lines to 32 lines.

You could probably even reduce it further like so:
```JS
$.extend( $.fn.dataTableExt.oSort, {
"currency-asc" : function (a, b) {
'use strict';
return cleanCurrency(a) - cleanCurrency(b);
},
"currency-desc" : function (a, b) {
'use strict';
return cleanCurrency(b) - cleanCurrency(a);
}
});
```
This gets it down to 28 lines, but it's fairly trivial.