This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var OFF = 0, WARN = 1, ERROR = 2; | |
module.exports = exports = { | |
"env": { | |
"es6": true | |
}, | |
"ecmaFeatures": { | |
// env=es6 doesn't include modules, which we are using | |
"modules": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Envia a encomenda para o mailer. | |
function serializeToJson(form) { | |
//Pega os dados do form serializa e converte para objeto | |
let data = $(form).serialize().split("&"); | |
let dataObj = {}; | |
for (var key in data) { | |
dataObj[data[key].split("=")[0]] = data[key].split("=")[1]; | |
} | |
//Converte o objeto para json | |
let dados = JSON.stringify(dataObj) |
OlderNewer