pomdtr
I mainly enjoy tinkering with the val.town api:
- VS Code integration: https://github.com/pomdtr/valtown-vscode
- CLI: https://github.com/pomdtr/vt
Public vals
347
webdavServer
@pomdtr
Script
Webdav Manage your vals from a webdav client (ex: https://cyberduck.io/) ⚠️ some webdav operations are not supported, so support can vary between clients. Installation Click "Create Val" on the code block, and change it's type to http. import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth";
import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
import { serveVals } from "https://esm.town/v/pomdtr/webdavServer";
export default basicAuth(serveVals, {
verifyUser: (user) => {
return verifyToken(user);
},
}); Use a val town token as the username, and keep the password blank to authenticate.
esm
@pomdtr
HTTP
Esm.town proxy (to get proper highlighting in VS Code) Usage https://pomdtr-esm.web.val.run/<author>/<val>@<version>/<filename> Supported filenames: mod.js mod.ts mod.jsx mod.tsx README.md Example: @pomdtr/serveGithubRepo -> https://pomdtr-esm.web.val.run/pomdtr/serveGithubRepo@34/mod.ts
neverthrow
@pomdtr
Script
Usage import { Failure, Success } from "https://esm.town/v/pomdtr/neverthrow?v=5";
const demoFunction = () => {
const result = Math.random();
if (result > 0.5) {
return Failure(
"Math. random produced too high a number",
);
}
return Success(result);
};
const res = demoFunction();
if (res.ok) {
console.log(res.value);
} else {
console.error(res.error);
}