function p(f, u) {
  if (!f || !u)
    return -1;
  var r = f.indexOf(u);
  return r !== -1 && f.splice(r, 1), r;
}
function i(f, u, r) {
  if (!(!f || !u)) {
    typeof r != "number" && (r = -1);
    var s = f.indexOf(u);
    if (s !== -1) {
      if (s === r)
        return;
      if (r !== -1)
        f.splice(s, 1);
      else
        return;
    }
    r !== -1 ? f.splice(r, 0, u) : f.push(u);
  }
}
export {
  i as add,
  p as remove
};
