Skip to content
← Public packages

@kody/personal-capture

Quick onboarding example: stash notes/links in packageStorage; list recent captures.

src/list-captures.ts

21 lines · 742 B · TypeScript
import { listCaptures, type CaptureItem, type ListCapturesInput } from './index.ts'

/**
 * List recent personal captures newest-first from packageStorage.
 * Use after `./capture` when you need to review what was stashed.
 *
 * @param input.limit - Max items to return (1–50, default 20).
 * @returns Recent capture items `{ id, text, url, createdAt }[]`.
 *
 * @example
 * import listCaptures from 'kody:@kody/personal-capture/listCaptures'
 * const items = await listCaptures({ limit: 5 })
 * // => [{ id: '...', text: '...', url: null, createdAt: '...' }, ...]
 */
export default async function listCapturesExport(
	input: ListCapturesInput = {},
): Promise<CaptureItem[]> {
	return await listCaptures(input)
}

export { listCaptures }