• pomdtr avatar
    refs
    @pomdtr
    An interactive, runnable TypeScript val by pomdtr
    Script
  • pomdtr avatar
    extractValInfo
    @pomdtr
    Extract vals infos (author, name, version) from a val url (either from esm.town or val.town ). Example usage: const {author, name} = extractValInfo(import.meta.url) Also returns a unique slug for the val: <author>/<name>
    Script
  • pomdtr avatar
    sql
    @pomdtr
    SQL Template Tag Port of blakeembrey/sql-template-tag for usage in val.town. Usage import { sqlite } from "https://esm.town/v/std/sqlite" import { sql, zip } from "https://esm.town/v/pomdtr/sql" const query = sql`SELECT * FROM books WHERE author = ${author}`; console.log(query.sql) // => "SELECT * FROM books WHERE author = ?" console.log(query.args) // => [author] const res = await sqlite.execute(query) console.table(zip(res)) For advanced usage (ex: nesting queries), refer to the project readme .
    Script
  • pomdtr avatar
    readme
    @pomdtr
    An interactive, runnable TypeScript val by pomdtr
    Script
  • std avatar
    sqlite
    @std
    SQLite - Docs ā†— SQLite is a lightweight, standard database. Every Val Town account comes with its own private SQLite database that is accessible from any of your vals via std/sqlite . Val Town SQLite is powered by Turso . Usage Migrations ORMs You may find these admin viewers helpful managing your database: SQLite Explorer (built in Val Town) LibSQL Studio Limits You can store 10mb on the free plan and up to 1gb on the paid plan. Contact us if you need more space. šŸ“ Edit docs
    Script
  • stevekrouse avatar
    html
    @stevekrouse
    An interactive, runnable TypeScript val by stevekrouse
    Script
  • pomdtr avatar
    gfm
    @pomdtr
    Markdown to html (with github styling)
    Script
1
Next
May 6, 2024