1.0.0 • Published 6 months ago

@fullstackcraftllc/codevideo-projections v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

codevideo-projections

Various projections (i.e. state at given checkpoint) for the CodeVideo ecosystem.

Usage - Get Final Course Snapshot from Lesson

Get the final course snapshot from a lesson. This is used in validation of continuity between the end of one lesson and the start of the next lesson.

import { getFinalCourseSnapshotFromLesson } from '@fullstackcraftllc/codevideo-projections';

// assuming myLesson is of type ILesson from @fullstackcraftllc/codevideo-types
const finalSnapshot = getFinalCourseSnapshotFromLesson(myLesson);

Usage - Get Course Snapshot After Actions

Gets the course snapshot after any number of actions.

import { getCourseSnapshotAfterActions } from '@fullstackcraftllc/codevideo-projections';

// assuming myActions is an array of IAction from @fullstackcraftllc/codevideo-types
const snapshot = getCourseSnapshotAfterActions(myActions);