Add signed option to to_human output.

This commit is contained in:
Stefan Thomas
2012-12-03 17:10:33 -08:00
parent d01f2fb123
commit 33611cdede

View File

@@ -513,6 +513,7 @@ Amount.prototype.to_human = function (opts)
}
var formatted = '';
if (opts.signed && this._is_negative) formatted += "- ";
formatted += int_part.length ? int_part : '0';
formatted += fraction_part.length ? '.'+fraction_part : '';