1.8.31 - fixes to lodash-es issues, added variable depth schemaPopulated population #262
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.
Please describe your change...
yarn factor dev
#260 lodash-es@^4.17.15 updates to 4.17.20 which results in ERR_REQUIRE_ESM #257For schemaPopulated, it now takes additional input which is an Array<string | string[]>, if string, it keeps the former behaviour of the function, if string[], it crawls individual array items it launches a recurrent crawling algorithm.
Let array be a list of object keys yet not of array indexes.
Starting from the root of object try to find a path leading to the string value using the keys defined in the index, if an object value is an array, launch the algorithm on all array values and flatten the result. If the key value is incorrect, return an empty array. If the algorithm doesn't find the value with set keys, return an empty array. If the algorithm finds a string value regardless of the absolved depth, return the string as an array.
Example: for an object {'abc': [{'def': {'er': 'a'}},{'def': {'er': 'b'}}], 'def': 'bca', 'ghi': {'jkl': 'abc'}} on inputs