mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
feat: assert runtime
This commit is contained in:
20
packages/bruno-cli/src/utils/common.js
Normal file
20
packages/bruno-cli/src/utils/common.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const lpad = (str, width) => {
|
||||
let paddedStr = str;
|
||||
while (paddedStr.length < width) {
|
||||
paddedStr = ' ' + paddedStr;
|
||||
}
|
||||
return paddedStr;
|
||||
};
|
||||
|
||||
const rpad = (str, width) => {
|
||||
let paddedStr = str;
|
||||
while (paddedStr.length < width) {
|
||||
paddedStr = paddedStr + ' ';
|
||||
}
|
||||
return paddedStr;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
lpad,
|
||||
rpad
|
||||
};
|
||||
Reference in New Issue
Block a user