-
Notifications
You must be signed in to change notification settings - Fork 665
Numeral.js
agershun edited this page Jan 11, 2015
·
3 revisions
You can use Numeral.js library to format numbers in Alasql expressions:
var data = [{a:120000003.456},{a:567234.12}];
// Pass numeral() function into alasql
alasql.fn.numeral = numeral;
// Use numeral() function
alasql('SELECT numeral(a)->format("0,0") FROM ?',[data]);
See the example in jsFiddle](http://jsfiddle.net/agershun/drvga85x/1/).
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo