Projeto Github Favorites, durante o desenvolvimento colocado em prática conceitos API, polimorfismo, classes, promises, imutabilidade, try, catch, throw, object literals, desestruturação JS, herança e ...
Eventually it will maintain a cache of traversed paths, but for the time-being you can use the above to check a common path, and then go through leaf nodes. This will save you a full path traversal ...