Last active
August 29, 2015 14:18
-
-
Save apcomplete/6bc05f64572d1439e452 to your computer and use it in GitHub Desktop.
iris money formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('./helpers'); | |
..... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Handlebars = require('hbsfy/runtime'); | |
var accounting = require('accounting'); | |
Handlebars.registerHelper('formatMoney', function(s) { | |
return accounting.formatMoney(s); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//auto load all other js files in folder | |
var fs = require('fs') | |
var files = fs.readdirSync(__dirname + '/'); | |
files.forEach(function(file) { | |
if (file.match(/.+\.js/g) !== null && file !== 'index.js') { | |
var name = file.replace('.js', ''); | |
exports[name] = require('./' + file); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://openexchangerates.github.io/accounting.js/