nci/lib/utils.js
2015-10-16 01:52:23 +03:00

17 lines
345 B
JavaScript

'use strict';
var _ = require('underscore'),
sharedUtils = require('../static/js/shared/utils');
_(exports).extend(sharedUtils);
exports.lpad = function(str, length, chr) {
chr = chr || '0';
while (str.length < length) str = chr + str;
return str;
};
exports.toNumberStr = function(number) {
return exports.lpad(String(number), 20);
};