• std avatar
    set
    @std
    @std.set Deprecated: use @std/blob now instead. Set a val on your account to JSON, which you can use as a key-value store.
    Script
  • kajgod avatar
    njuskaloCreateHtmlResponse
    @kajgod
    An interactive, runnable TypeScript val by kajgod
    Script
  • kajgod avatar
    njuskaloCreateDataWithInterfaces
    @kajgod
    An interactive, runnable TypeScript val by kajgod
    Script
  • karfau avatar
    isRequest
    @karfau
    A type guard for vals that expect a WebApi Request as the first parameter. Since a val can be invoked by run, web, express or even email, the correct type for a web endpoint should be req?: Request | unknown . By using this type guard and handling the false case, all later code can safely access the request: export const myVal = (req?: Request | unknown) => { if (!@karfau.isRequest(req)) { return `This val has to be used with the web endpoint, see ${@neverstew.thisValUrl()}`; } if (req.method === 'GET') { // ... } }
    Script
1
Next
kajgod-njuskaloindex.express.val.run
October 23, 2023