function createIndexMap(items) {
    var result = {};
    for (var i = 0; i < items.length; i++) {
      result[items[i]._id] = i;
    }
    return result;
  }
Create index map from items.

@param {Item[]} items
@returns {Object}