Skip to content

Instantly share code, notes, and snippets.

@pmsorhaindo
pmsorhaindo / keybase.md
Created October 19, 2022 11:38
keybase.md

Keybase proof

I hereby claim:

  • I am pmsorhaindo on github.
  • I am pmsorhaindo (https://keybase.io/pmsorhaindo) on keybase.
  • I have a public key ASAM_wLHuwj50Uq9i61mQQrhzlp7zxFNspqoK28Kb7hY5Qo

To claim this, I am signing this object:

@pmsorhaindo
pmsorhaindo / findPath.js
Last active November 30, 2016 14:36
returns a path to the first leaf node in an query tree which passes a given predicate.
console.clear();
function findPath(node, predicate) {
var depth = 0;
var path = [];
var found = false;
function find(currentNode, i) {
if (found) {
return path;
}