hughsk / hughsk/flat

Flatten arrays to string

Open
#85 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
197
PR merge metrics
No merged PRs in 30d

Description

Hi, I have a unique use-case, I am currently building a dynamic table based on an object's keys. So this does not work correctly when the object has an array associated with it. Would it be possible to add an additional parameter to specify that arrays should be strings with the safe option associated?

for example:
`flatten({
title:'Hello world',
countries: ['ZAF','USA','GRL']
}, {
safe:true,
arraytostring:true
});

//output:
// {
// title:'Hello World',
// countries: '["ZAF","USA","GRL"]'
`

If you do not want to add this functionality to your repo, can I clone the project and add this for my specific use-case?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.