docs: function visit(obj,comparison,callbacks) {
      let state = {identityDetection:true};
      let count = 0;
      if (callbacks.before) state = callbacks.before(obj,'',{});
      recurse(obj,state,function(obj,key,state){
          let selected = true;
          if (callbacks.where) {
              selected = callbacks.where(obj,key,state);
          }
          if (selected) {
              if (callbacks.filter) {
                  obj[key] = callbacks.filter(obj,key,state);
                  if (typeof obj[key] === 'undefined') {
                      delete obj[key]; // to be doubly sure
                  }
              }
              if (typeof obj[key] !== 'undefined') {
                  if (callbacks.compare && comparison) {
                      let equiv = jptr(comparison,state.path);
                      if (equiv) {
                          obj[key] = callbacks.compare(obj,key,state,equiv);
                      }
                  }
                  if (typeof obj[key] !== 'undefined' && state.identity && callbacks.identity) {
                      obj[key] = callbacks.identity(obj,key,state,state.identityPath);
                  }
                  if (typeof obj[key] !== 'undefined') {
                      if (callbacks.selected) {
                          callbacks.selected(obj,key,state);
                      }
                      count++;
                  }
              }
          }
      });
      if (callbacks.count) callbacks.count(obj,'',state,count);
      if (callbacks.finally) callbacks.finally(obj,'',state);
      return obj;
  }