mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Sanity-check decaffeinate ajax
This commit is contained in:
parent
262a0b9d56
commit
04d167c9e0
1 changed files with 2 additions and 12 deletions
|
@ -1,19 +1,9 @@
|
|||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Sanity-check the conversion and remove this comment.
|
||||
/*
|
||||
* decaffeinate suggestions:
|
||||
* DS102: Remove unnecessary code created because of implicit returns
|
||||
* DS205: Consider reworking code to avoid use of IIFEs
|
||||
* DS207: Consider shorter variations of null checks
|
||||
* DS208: Avoid top-level this
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
|
||||
*/
|
||||
const MIME_TYPES = {
|
||||
json: "application/json",
|
||||
html: "text/html",
|
||||
};
|
||||
|
||||
this.ajax = function (options) {
|
||||
function ajax(options) {
|
||||
applyDefaults(options);
|
||||
serializeData(options);
|
||||
|
||||
|
@ -30,7 +20,7 @@ this.ajax = function (options) {
|
|||
} else {
|
||||
return parseResponse(xhr, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
ajax.defaults = {
|
||||
async: true,
|
||||
|
|
Loading…
Reference in a new issue