@usfm-tools/usj-core
v0.1.1
Published
USJ document helpers: chapter slicing and alignment stripping (no editor / OT)
Readme
@usfm-tools/usj-core
Browser-safe helpers for USJ documents:
splitUsjByChapter/ChapterSlice— split flatcontentat each\cmarker (chapter0= preface).stripAlignments/stripArray— extract unfoldingWord-style alignments into a map and gateway-languageEditableUSJ.- Gateway tokens (shared with the editor) —
findVerseInlineNodes,collectVerseTextsFromContent,tokenizeWords,normalizeWordForAlignmentMatch,alignmentWordSurfacesEqual,tokenizeGatewayUsj/GatewayWordToken,occurrenceStats,transIndexForAlignedWord(mapAlignmentGroup.targetsto verse tokens). UsjDocument— minimal{ type: 'USJ'; version; content }type.
Used by read-only scripture views and re-exported from @usfm-tools/editor-core for backwards compatibility.
Build
bun install
bun run build