UNPKG

644 BJavaScriptView Raw
1"use strict";
2
3var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
5Object.defineProperty(exports, "__esModule", {
6 value: true
7});
8exports.getFormData = void 0;
9
10var _from = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/from"));
11
12var getFormData_ = function getFormData_(formEl) {
13 var formData = new FormData(formEl);
14 var data = {};
15 (0, _from.default)(formData.entries()).forEach(function (pair) {
16 // eslint-disable-next-line prefer-destructuring
17 data[pair[0]] = pair[1];
18 });
19 return data;
20};
21
22var getFormData = getFormData_;
23exports.getFormData = getFormData;
\No newline at end of file