mirror of
https://github.com/20kaushik02/express-sequelize-backend-template.git
synced 2026-01-25 07:14:06 +00:00
Minor fixes, comments
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
function getNestedValuesString(obj) {
|
||||
/**
|
||||
* String joins all the values of a JSON object, including nested keys
|
||||
*
|
||||
* @param {any} obj JSON object
|
||||
* @param {string} delimiter Delimiter of final string
|
||||
* @returns
|
||||
*/
|
||||
const getNestedValuesString = (obj, delimiter) => {
|
||||
let values = [];
|
||||
for (key in obj) {
|
||||
if (typeof obj[key] !== "object") {
|
||||
@@ -8,7 +15,7 @@ function getNestedValuesString(obj) {
|
||||
}
|
||||
}
|
||||
|
||||
return values.join();
|
||||
return delimiter ? values.join(delimiter) : values.join();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Whole thing is winston logger stuff, if you want to learn read the docs
|
||||
|
||||
const path = require("path");
|
||||
|
||||
const { createLogger, transports, config, format } = require("winston");
|
||||
|
||||
Reference in New Issue
Block a user