nbbaier
filterVals
Script
filterVals This val exports a utility function that returns a list of all a user's val, filtered by a callback function. Example Get the names of all your private vals: import { filterVals } from "https://esm.town/v/nbbaier/filterVals";
const id = <user_id>
const vals = await filterVals(id, (v) => v.privacy === "private")
const privateValNames = vals.map(v => v.name);
1
nbbaier
emptyValUtils
Script
Empty Val Utils Handy utility functions to see if you have vals with no code lying around your account and to delete them (is you want to). Usage listEmptyVals import {listEmptyVals } from "https://esm.town/v/nbbaier/deleteEmptyVals";
console.log(await listEmptyVals(<user_id>)) deleteEmptyVals import {listEmptyVals } from "https://esm.town/v/nbbaier/deleteEmptyVals";
await deleteEmptyVals(<user_id>)
1
Updated: January 8, 2024