code: function findInInventory (inventory, $refParent, $refKey) {
    for (var i = 0; i < inventory.length; i++) {
      var existingEntry = inventory[i];
      if (existingEntry.parent === $refParent && existingEntry.key === $refKey) {
        return existingEntry;
      }
    }
  }
docs: TODO