init: Initial Commit

This commit is contained in:
2024-01-15 20:47:37 -05:00
commit 5a2fd27aa3
28 changed files with 3416 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
const formatDictionaryAsString = (obj: Object, indentation = 2) => {
let result: string = "{\n";
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
let value = obj[key];
let line = ' '.repeat(indentation) + `${key}: '${value}',\n`;
result += line;
}
}
result = result.slice(0, -2);
result += `\n}`;
return result;
}
export default formatDictionaryAsString;