MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / s

Class s

env/env.js:2–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1function Env(t, e) {
2 class s {
3 constructor(t) {
4 this.env = t
5 }
6 send(t, e = 'GET') {
7 t = 'string' == typeof t ? { url: t } : t
8 let s = this.get
9 return (
10 'POST' === e && (s = this.post),
11 new Promise((e, a) => {
12 s.call(this, t, (t, s, r) => {
13 t ? a(t) : e(s)
14 })
15 })
16 )
17 }
18 get(t) {
19 return this.send.call(this.env, t)
20 }
21 post(t) {
22 return this.send.call(this.env, t, 'POST')
23 }
24 }
25 return new (class {
26 constructor(t, e) {
27 ;(this.name = t),

Callers 1

runScriptMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected