util.js
function paths (object, test) {
  var p = []
  if(test(object)) return []
  for(var key in object) {
    var value = object[key]
    if(test(value)) p.push(key)
    else if(isObject(value))
      p = p.concat(paths(value, test).map(function (path) {
        return [key].concat(path)
      }))
  }
  return p
}
function paths (object, test) {
  var p = []
  if(test(object)) return []
  for(var key in object) {
    var value = object[key]
    if(test(value)) p.push(key)
    else if(isObject(value))
      p = p.concat(paths(value, test).map(function (path) {
        return [key].concat(path)
      }))
  }
  return p
}
function paths ( object , test ) { var p = [ ] if ( test ( object ) ) return [ ] for ( var key in object ) { var value = object [ key ] if ( test ( value ) ) p . push ( key ) else if ( isObject ( value ) ) p = p . concat ( paths ( value , test ) . map ( function ( path ) { return [ key ] . concat ( path ) } ) ) } return p }
get all paths within an object this can probably be optimized to create less arrays!
get all paths within an object this can probably be optimized to create less arrays!