docs: function inventory$Ref ($refParent, $refKey, path, pathFromRoot, indirections, inventory, $refs, options) {
    var $ref = $refKey === null ? $refParent : $refParent[$refKey];
    var $refPath = url.resolve(path, $ref.$ref);
    var pointer = $refs._resolve($refPath, options);
    var depth = Pointer.parse(pathFromRoot).length;
    var file = url.stripHash(pointer.path);
    var hash = url.getHash(pointer.path);
    var external = file !== $refs._root$Ref.path;
    var extended = $Ref.isExtended$Ref($ref);
    indirections += pointer.indirections;
  
    var existingEntry = findInInventory(inventory, $refParent, $refKey);
    if (existingEntry) {
      // This $Ref has already been inventoried, so we don't need to process it again
      if (depth < existingEntry.depth || indirections < existingEntry.indirections) {
        removeFromInventory(inventory, existingEntry);
      }
      else {
        return;
      }
    }
  
    inventory.push({
      $ref: $ref,                   // The JSON Reference (e.g. {$ref: string})
      parent: $refParent,           // The object that contains this $ref pointer
      key: $refKey,                 // The key in `parent` that is the $ref pointer
      pathFromRoot: pathFromRoot,   // The path to the $ref pointer, from the JSON Schema root
      depth: depth,                 // How far from the JSON Schema root is this $ref pointer?
      file: file,                   // The file that the $ref pointer resolves to
      hash: hash,                   // The hash within `file` that the $ref pointer resolves to
      value: pointer.value,         // The resolved value of the $ref pointer
      circular: pointer.circular,   // Is this $ref pointer DIRECTLY circular? (i.e. it references itself)
      extended: extended,           // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
      external: external,           // Does this $ref pointer point to a file other than the main JSON Schema file?
      indirections: indirections,   // The number of indirect references that were traversed to resolve the value
    });
  
    // Recursively crawl the resolved value
    crawl(pointer.value, null, pointer.path, pathFromRoot, indirections + 1, inventory, $refs, options);
  }