You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, checkFn receives two things: target and propKey. Which is useful for low complexity objects.
Implementing a propKey's target path will be useful for more complex objects.
What if I need to download the smallest image only?
I won't know where "val" came from when downloadIfSmallest is called because it only knows two things: val, propKey, so, implementing a "propPath" may be useful for such task.
this propPath should look like .images.candidates.1.url which is the 50x50 image.
with that path, I should be able to look into .images.candidates.1 of the main object to know if it is the value I am looking for or not (using width and height properties.)
Currently, checkFn receives two things: target and propKey. Which is useful for low complexity objects.
Implementing a propKey's target path will be useful for more complex objects.
For example
What if I need to download the smallest image only?
I won't know where "val" came from when downloadIfSmallest is called because it only knows two things: val, propKey, so, implementing a "propPath" may be useful for such task.
this propPath should look like
.images.candidates.1.url
which is the 50x50 image.with that path, I should be able to look into
.images.candidates.1
of the main object to know if it is the value I am looking for or not (usingwidth
andheight
properties.)What do you think?
I did it by myself if anyone is interested:
The text was updated successfully, but these errors were encountered: