import { Lab } from "labs/labs.ts";
interface Note {
title?: string;
content: string;
}
const notesLab = new Lab()
.variable("notes", new Map<string, Note>())
.procedure(
"notes.add",
(note: Note, { notes }) => {
const id = crypto.randomUUID();
notes.set(id, note);
return { id };
},
["notes"],
)
.procedure(
"notes.get",
({ id }: { id: string }, { notes }) => {
return notes.get(id);
},
["notes"],
)
.procedure(
"notes.list",
(_, { notes }) => {
return Array.from(notes.values());
},
["notes"],
);
notesLab.execute(
"notes.add",
{ title: "Hello", content: "World" },
);
const notes = notesLab.execute(
"notes.list",
{},
);
console.log(notes);
Software out the wazoo!
JSX runtime and compiler for composing JSON data. Visit the official jsonx website to play with JSON like never before!
Library of @fartlabs/jsonx
components for composing HTML content. Visit the generated API documentation to learn more!
Library of @fartlabs/jsonx
components for composing @fartlabs/rt
routers. Visit the generated API documentation to learn more!
Labs are data structures designed for composable and type-safe management of variables and procedures at scale.
Blockly IDE integration with Fresh and Deno Subhosting. Winner of Deno Subhosting Hackathon (Ryan Dahl's favorite). Visit Deno Blocks!
We maintain ethical, economically-sustainable, built-to-last, organic, open-source software… out the wazoo! We specialize in imagination-driven development. Learn more about us on our Blog.
Join our Discord server to chat with us and other members of the community. Also, check out our GitHub org.