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
function isLambda(func){ | |
if(typeof func !== "function") throw new Error("invalid function was provided") | |
let firstLine = func.toString() | |
.split("\n")['0'] | |
.replace(/\n|\r|\s/ig, "") | |
return (!firstLine.includes("function") && (firstLine.includes(")=>{") || firstLine.includes("){"))) | |
} |
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
java -jar swagger-codegen-cli-2.3.1.jar generate -i swagger.json -o client-generated-folder -l javascript --additional-properties useInheritance=true,useES6=true,usePromises=true -t ./templates |
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
{{>licenseInfo}} | |
import superagent from "superagent"; | |
import querystring from "querystring"; | |
import moment from "moment-timezone" | |
{{#emitJSDoc}}/** | |
* @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient | |
* @version {{projectVersion}} | |
*/ |
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
/** | |
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object | |
* | |
* @param string url | |
* @param object callback | |
* @param mixed data | |
* @param null x | |
*/ | |
function ajax(url, callback, data, x) { | |
try { |