Back to packages list

Vals using effect

Description from the NPM package:
The missing standard library for TypeScript, for writing production-grade software.
dvdsgl avatar
dvdsgl
val
Script
Val Effects Effects for Val Town. HTTP Easily create effect-based HTTP Vals. import { Effect } from "npm:effect"; import * as Val from "https://esm.town/v/dvdsgl/val"; export default Val.http(req => Effect.gen(function*(){ return Response.json({ ok: true, love: "effect" }); }));
1
dvdsgl avatar
dvdsgl
effect
Script
// Make a string like 3.1s or 123ms from a Duration
0
dvdsgl avatar
dvdsgl
glide
Script
Glide API 2.0 Effects and utility functions for working with Glide API 2.0. Authentication Set glide environment variable to authenticate. If using effect, you can also provide a layer constructed with Glide.layer . Examples Simplest case, use runIngest with an async fetch : import * as Glide from "https://esm.town/v/dvdsgl/glide"; await Glide.importTable({ table: "abc123-def456-ghi789", getRows: async function*() { // yield Row[] to add them to the stash yield [{ Name: "David" }]; }, }); Load 20k pull requests: import * as Glide from "https://esm.town/v/dvdsgl/glide"; await Glide.importTable({ table: "abc123-def456-ghi789", getRows: async function*() { const octokit = new Octokit({ auth: "..." }); for await ( const { data: prs } of octokit.paginate.iterator(octokit.rest.pulls.list, { owner: "glideapps", repo: "glide", state: "all" }) ) yield prs; }, });
0
ravvi_kumar avatar
ravvi_kumar
greenPeafowl
Script
// just like functions, effects themselves are just values
0
1
Next