Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten function filters out empty arrays. #41

Open
youfoundron opened this issue Nov 16, 2020 · 0 comments
Open

Flatten function filters out empty arrays. #41

youfoundron opened this issue Nov 16, 2020 · 0 comments

Comments

@youfoundron
Copy link

import flatten from "keypather/flatten";

const myObj = { foo: [] }
const myOtherObj = { foo: ['bar'] }

flatten(myObj) // => {} Missing "foo" key
flatten(myOtherObj) // => { 'foo[0]': 'bar' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant