-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
fix deepkeys to work with empty arrays and objects #105
Conversation
40f947c
to
9045742
Compare
CI is failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO: this behaviour is a little more intuitive than skipping empty objects. It'd be great to have something explicit in the docs though.
8f27bed
to
4ca581e
Compare
sorry, I was a little busy with other projects, now I fixed as it should be, all tests passed @sindresorhus |
4ca581e
to
6920d3f
Compare
You need to update the docs. |
6920d3f
to
53e5c63
Compare
@sindresorhus check it |
b6c642b
to
8aee18b
Compare
readme.md
Outdated
@@ -110,7 +110,7 @@ console.log(getProperty(object, escapedPath)); | |||
|
|||
### deepKeys(object) | |||
|
|||
Returns an array of every path. Plain objects are deeply recursed and are not themselves included. | |||
Returns an array of every path. Plain not empty objects are deeply recursed and are not themselves included. Empty objects or objects without values are included, e.g [], {}, null, undefined or NaN. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more confusing than it needs to be. Just say that non-empty plain objects and arrays are not themselves included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sindresorhus check it
You also need to update index.d.ts docs. |
8aee18b
to
170800f
Compare
170800f
to
434c09f
Compare
fix #104