async function matchUser(opUserEmail, userList) {
  const users = userList ? userList : await getUsers()
  return users.reduce((acc, user) => {
    if (user.email === opUserEmail) {
      return [...acc, user]
    }
    return acc
  }, [])
}
/**
 * matchUser attempts to match a PagerDuty user to the user running the op.
 *
 * @param {array} opUserEmail The list of email address for the user running the op
 * @param {array} userList Optional. A list of users to reduce
 *
 * @return {array} The matched PagerDuty users or an empty array
 */
matchUser attempts to match a PagerDuty user to the user running the op.
@param {array} opUserEmail The list of email address for the user running the op
@param {array} userList Optional. A list of users to reduce

@return {array} The matched PagerDuty users or an empty array
matchUser attempts to match a PagerDuty user to the user running the op . @param { array } opUserEmail The list of email address for the user running the op @param { array } userList Optional . A list of users to reduce @return { array } The matched PagerDuty users or an empty array
async function matchUser(opUserEmail, userList) {
  const users = userList ? userList : await getUsers()
  return users.reduce((acc, user) => {
    if (user.email === opUserEmail) {
      return [...acc, user]
    }
    return acc
  }, [])
}
async function matchUser ( opUserEmail , userList ) { const users = userList ? userList : await getUsers ( ) return users . reduce ( ( acc , user ) => { if ( user . email === opUserEmail ) { return [ ... acc , user ] } return acc } , [ ] ) }
matchUser attempts to match a PagerDuty user to the user running the op.
matchUser attempts to match a PagerDuty user to the user running the op .