0.5.3 • Published 2 years ago
@tim-code/browser-command v0.5.3
browser-command
npm install @tim-code/browser-command
A companion library to gateway
, this allows for backend endpoints to be called almost as if they were functions.
Philosophy
import * as command from "@tim-code/autotest"
// note this filename needs to correspond to backend cookie/endpoint (i.e. "fs")
// alternatively can just pass string instead of "import.meta.url"
// command.post("fs", "root")
command.post(import.meta.url, "root")
command.get(import.meta.url, "root")
command.request(import.meta.url, "root")
command.factory(import.meta.url)("root")
Typeical Usage
From web-service
:
const run = command.factory(import.meta.url)
export function fetch(url, options = {}) {
return run("fetch", { url, options })
}
0.5.3
2 years ago
0.5.0
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.5.2
2 years ago
0.5.1
2 years ago
0.4.2
2 years ago
0.3.0
2 years ago
0.3.5
2 years ago
0.3.2
2 years ago
0.3.1
2 years ago
0.3.4
2 years ago
0.3.3
2 years ago
0.2.4
2 years ago
0.2.2
2 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
0.0.1
3 years ago