MCPcopy Create free account
hub / github.com/Semporia/Scripts / s

Class s

jd_api_test.js:116–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);
115
116 class s {
117 constructor(t) {
118 this.env = t
119 }
120
121 send(t, e = "GET") {
122 t = "string" == typeof t ? {url: t} : t;
123 let s = this.get;
124 return "POST" === e && (s = this.post), new Promise((e, i) => {
125 s.call(this, t, (t, s, r) => {
126 t ? i(t) : e(s)
127 })
128 })
129 }
130
131 get(t) {
132 return this.send.call(this.env, t)
133 }
134
135 post(t) {
136 return this.send.call(this.env, t, "POST")
137 }
138 }
139
140 return new class {
141 constructor(t, e) {

Callers 1

runScriptMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected