"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const utils = require("../utils.js");
const toFormData = require("./toFormData.js");
const index = require("../platform/index.js");
function toURLEncodedForm(data, options) {
  return toFormData.default(data, new index.default.classes.URLSearchParams(), {
    visitor: function(value, key, path, helpers) {
      if (index.default.isNode && utils.default.isBuffer(value)) {
        this.append(key, value.toString("base64"));
        return false;
      }
      return helpers.defaultVisitor.apply(this, arguments);
    },
    ...options
  });
}
exports.default = toURLEncodedForm;
