mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 14:14:06 +00:00
env structure, overall formatting check, sequelize config, minor util checks, minor validator aggregation change
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
/**
|
||||
* Returns a single string of the values of all keys in the given JSON object, even nested ones.
|
||||
* Stringifies only values of a JSON object, including nested ones
|
||||
*
|
||||
* @param {*} obj
|
||||
* @param {any} obj JSON object
|
||||
* @param {string} delimiter Delimiter of final string
|
||||
* @returns {string}
|
||||
*/
|
||||
const getNestedValuesString = (obj) => {
|
||||
const getNestedValuesString = (obj, delimiter = ', ') => {
|
||||
let values = [];
|
||||
for (key in obj) {
|
||||
if (typeof obj[key] !== "object") {
|
||||
@@ -14,7 +15,7 @@ const getNestedValuesString = (obj) => {
|
||||
}
|
||||
}
|
||||
|
||||
return values.join();
|
||||
return values.join(delimiter);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user