Created
September 29, 2019 17:10
-
-
Save spacelatte/f460dabd975ab13ab8bc8be28b68e516 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
async function fn() { | |
let split = (await fetch("").then(x => x.text())).split("-") | |
return (await fetch("", { | |
method: "POST", | |
headers: { "content-type": "application/json" }, | |
body: JSON.stringify({ answer: JSON.parse(split[0].replace(/'/g, '"')).map(x => isNaN(parseInt(x)) ? x : parseInt(x)).sort((a, b) => ((typeof(a) === typeof(b)) ? ((a === b) ? 0 : ((a > b) ? +1 : -1)) : ((split[2].search("Number") > 0) ? ((typeof(a) === "number") ? -1 : +1) : ((typeof(a) === "string") ? -1 : +1)))), }), | |
}).then(x => x.text()).then(x => (x.search("STMCTF") >= 0) ? alert(x) : x)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment