code: function find(queue, name) {
    const out = queue.findIndex(e => e.name === name);
    if (out === -1) {
      throw new Error(`${name}: Could not find this function`);
    }
  
    return out;
  }
docs: Find the index of a function.