US Congress Stock Trading API examples & templates
Use these vals as a playground to view and fork US Congress Stock Trading API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
disposable
@postpostscript
Script
disposable: wrapper to make an object disposable with the using keyword using feature explanation in TypeScript 5.2 docs Example: import { disposable } from "https://esm.town/v/postpostscript/disposable";
using state = disposable(
{
x: 1,
y: 2,
},
(value) => console.log("state disposed", value),
);
// state disposed { x: 1, y: 2, [Symbol(Symbol.dispose)]: [Function (anonymous)] } or, to use a proxy instead of modifying the original object: using state = disposable(
{
x: 1,
y: 2,
},
(value) => console.log("proxyState disposed", value),
true,
);
// proxyState disposed { x: 1, y: 2 } Full Example
indirection
@jxnblk
HTTP
A game of riddles to play with your friends How to play To start a game, choose a 3-20 letter word. The game generates a riddle based on your word. Copy the link to share with your friends to see if they can guess the word. If they guess the word correctly, they get to pick a new word and can send you a new clue back. If they guess wrong, the next riddle is based on the word they guessed You can play with 2 or as many people as you want.
You can follow a long chain, like the game Telephone or games can branch with multiple players. TODO [ ] Reload after updating the URL to support native share sheets [ ] Incorrect state / helpers [x] Trim and lowercase guesses