fix deepkeys to work with empty arrays and objects#105
Merged
sindresorhus merged 1 commit intosindresorhus:mainfrom Apr 22, 2023
Merged
fix deepkeys to work with empty arrays and objects#105sindresorhus merged 1 commit intosindresorhus:mainfrom
sindresorhus merged 1 commit intosindresorhus:mainfrom
Conversation
40f947c to
9045742
Compare
sindresorhus
reviewed
Mar 5, 2023
Owner
|
CI is failing |
mmkal
approved these changes
Mar 6, 2023
Contributor
mmkal
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
sorry, I was a little busy with other projects, now I fixed as it should be, all tests passed @sindresorhus |
4ca581e to
6920d3f
Compare
Owner
|
You need to update the docs. |
6920d3f to
53e5c63
Compare
Contributor
Author
@sindresorhus check it |
b6c642b to
8aee18b
Compare
readme.md
Outdated
| ### 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. |
Owner
There was a problem hiding this comment.
This is more confusing than it needs to be. Just say that non-empty plain objects and arrays are not themselves included.
Owner
|
You also need to update index.d.ts docs. |
8aee18b to
170800f
Compare
170800f to
434c09f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #104