mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 06:55:07 +00:00
17 lines
345 B
JavaScript
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);
|
|
};
|