SaadShamim / fsrs.js

A spaced repetition algorithm which overtakes Anki and catches up with SuperMemo.

Home Page:https://github.com/open-spaced-repetition/free-spaced-repetition-scheduler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JavaScript module of Free Spaced Repetition Scheduler algorithm, based on the DSR model proposed by Piotr Wozniak, author of SuperMemo.

Usage

npm install fsrs.js to import this module.

Example

const fsrs = require("fsrs.js")

//input data
var cardData={id:'id'},
    grade=-1,//Grade `-1` means learn new card,and `0, 1, 2` means review old card.
    globalData=null;

var outputData = fsrs(cardData,grade,globalData)//Return {cardData,globalData}. You can save this output data and use it as input data the next time you update grade.

console.log(outputData)

About

A spaced repetition algorithm which overtakes Anki and catches up with SuperMemo.

https://github.com/open-spaced-repetition/free-spaced-repetition-scheduler

License:MIT License


Languages

Language:JavaScript 100.0%