not used code
This commit is contained in:
1 parent
503a7d9283
commit
c74ea51db5
2 files changed
+5
-11
No files matched your search
@@ -4,21 +4,11 @@ exports.newCloudUtilities = function newCloudUtilities() {
|
||||
const MODULE_NAME = "Cloud Utilities";
|
||||
|
||||
let utilities = {
|
||||
pad: pad,
|
||||
calculatePresicion: calculatePresicion
|
||||
pad: pad
|
||||
};
|
||||
|
||||
return utilities;
|
||||
|
||||
function calculatePresicion(number) {
|
||||
|
||||
for (let i = -10; i <= 10; i++) {
|
||||
if (number < Math.pow(10, i)) {
|
||||
return Math.pow(10, i - 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function pad(str, max) {
|
||||
str = str.toString();
|
||||
return str.length < max ? pad("0" + str, max) : str;
|
||||
|
||||
Reference in new issue
Block a user