UNPKG

histoire

Version:

A fast story book powered by Vite

10 lines (8 loc) • 276 B
import type { Context } from '../context.js' export function story(ctx: Context, id: string) { const moduleId = id.replace('\0', '') const storyFile = ctx.storyFiles.find(f => f.moduleId === moduleId && f.virtual) if (storyFile) { return storyFile.moduleCode } }