You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
439 B
26 lines
439 B
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.camelize = camelize;
|
|
exports.padZero = padZero;
|
|
var camelizeRE = /-(\w)/g;
|
|
|
|
function camelize(str) {
|
|
return str.replace(camelizeRE, function (_, c) {
|
|
return c.toUpperCase();
|
|
});
|
|
}
|
|
|
|
function padZero(num, targetLength) {
|
|
if (targetLength === void 0) {
|
|
targetLength = 2;
|
|
}
|
|
|
|
var str = num + '';
|
|
|
|
while (str.length < targetLength) {
|
|
str = '0' + str;
|
|
}
|
|
|
|
return str;
|
|
} |