@mdsrs/core
v0.0.0
Published
Core primitives for Markdown-native spaced repetition.
Readme
@mdsrs/core
Core primitives for Markdown-native spaced repetition.
This package contains:
parseDeckandparseCollectionforQ:/A:andC:Markdown cards.hashCardContentandhashCardFamilyfor content-addressed card identity.scheduleReviewfor deterministic FSRS-style scheduling.buildReviewQueuefor due-card ordering and cloze sibling burial.buildDeckTreefor human-readable deck navigation.
Example
import { buildReviewQueue, parseCollection, scheduleReview } from '@mdsrs/core';
const cards = parseCollection([
{
deckName: 'Example',
filePath: 'example.md',
text: 'Q: What is the source of truth?\nA: Markdown.'
}
]);
const queue = buildReviewQueue(cards, new Map());
const result = scheduleReview(queue[0]?.performance, 'good', new Date('2026-01-01T00:00:00.000Z'));Runtime note
@mdsrs/core currently uses Node's built-in crypto module for synchronous SHA-256 hashing.
The API is otherwise framework-agnostic and does not depend on a database, renderer, or web framework.
