function p(n = {}, r = null, e = []) {
  for (let [o, f] of Object.entries(n)) t(e, u(r, o), f);
  return e;
}
function u(n, r) {
  return n ? n + "[" + r + "]" : r;
}
function t(n, r, e) {
  if (Array.isArray(e)) for (let [o, f] of e.entries()) t(n, u(r, o.toString()), f);
  else e instanceof Date ? n.push([r, e.toISOString()]) : typeof e == "boolean" ? n.push([r, e ? "1" : "0"]) : typeof e == "string" ? n.push([r, e]) : typeof e == "number" ? n.push([r, `${e}`]) : e == null ? n.push([r, ""]) : p(e, r, n);
}
export {
  p as objectToFormEntries
};
