Skip to content
Source
Sign inSign up
TanStack/showcase
A read-only demo of every feature
Every page of this repository is open, and nothing can change. Take a guided tour of what TanStack Source does.

TanStack/showcase

README.md

Tasks

A small, typed task list library with no dependencies, and the public demo repository of TanStack Source.

Install

pnpm add @tanstack-showcase/tasks

Use it

import { addTask, completeTask, openTasks } from '@tanstack-showcase/tasks'

let list = addTask([], 'Write the docs')
list = addTask(list, 'Fix the bug', 1)
list = completeTask(list, 1)
openTasks(list) // [{ id: 2, title: 'Fix the bug', done: false, priority: 1 }]

API

FunctionWhat it does
addTask(list, title, priority?)Adds a task with the next id.
completeTask(list, id)Marks a task as done.
removeTask(list, id)Removes a task.
openTasks(list)The open tasks, the most important first.
formatList(list)The list as Markdown checkboxes.
progress(list)The share of done tasks, in percent.

About this repository

Open the tabs of this repository to see what Source does: issues with screening, pull requests in stacks and in the merge queue, typed CI, the software factory, skills and assets.

The repository is read-only: every page is open to everyone, and nothing can change. Take the guided tour from the banner at the top of each page.