pathfindr
safely traverse objects or arrays without breaking your application.
pathfindrpath: string, model: any, fallbackValue?: any : result | fallbackValue
Example
const data = users: images: url: '/image.png' ;
const result = ; // => /image.png
This will not break the application
const data = {};
const result = ; // => null
This will not break the application and set fallback value
const data = {};
const result = ; // => /fallback.png