diff --git a/classes/FSRS.html b/classes/FSRS.html index 640de5a..8f50a07 100644 --- a/classes/FSRS.html +++ b/classes/FSRS.html @@ -1,4 +1,4 @@ -FSRS | ts-fsrs

Class FSRS

Hierarchy

  • FSRSAlgorithm
    • FSRS

Constructors

constructor +FSRS | ts-fsrs

Class FSRS

Hierarchy

  • FSRSAlgorithm
    • FSRS

Constructors

Properties

Methods

apply_fuzz @@ -20,62 +20,62 @@ preProcessLog repeat rollback -

Constructors

Properties

seed?: string

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    +

Constructors

Properties

seed?: string

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    Parameters

    • ivl: number

      The interval to be fuzzed.

    Returns number

    • The fuzzed interval.
    -
  • The formula used is : +

  • The formula used is : $$\min {\max {D_0,1},10}$$

    Parameters

    • difficulty: number

      D \in [1,10]

      -

    Returns number

  • The formula used is : +

Returns number

Returns void

Returns int

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/SchedulingCard.html b/classes/SchedulingCard.html index 52d024d..c77958f 100644 --- a/classes/SchedulingCard.html +++ b/classes/SchedulingCard.html @@ -1,4 +1,4 @@ -SchedulingCard | ts-fsrs

Class SchedulingCard

Hierarchy

  • SchedulingCard

Constructors

constructor +SchedulingCard | ts-fsrs

Class SchedulingCard

Hierarchy

  • SchedulingCard

Constructors

Properties

Constructors

Properties

again: Card
easy: Card
good: Card
hard: Card
last_elapsed_days: number
last_review: Date

Methods

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

again: Card
easy: Card
good: Card
hard: Card
last_elapsed_days: number
last_review: Date

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/enums/Rating.html b/enums/Rating.html index c6a7162..935d121 100644 --- a/enums/Rating.html +++ b/enums/Rating.html @@ -1,6 +1,6 @@ -Rating | ts-fsrs

Enumeration Rating

Enumeration Members

Again +Rating | ts-fsrs

Enumeration Rating

Enumeration Members

Enumeration Members

Again: 1
Easy: 4
Good: 3
Hard: 2
Manual: 0

Generated using TypeDoc

\ No newline at end of file +

Enumeration Members

Again: 1
Easy: 4
Good: 3
Hard: 2
Manual: 0

Generated using TypeDoc

\ No newline at end of file diff --git a/enums/State.html b/enums/State.html index 7a25c68..3feeaea 100644 --- a/enums/State.html +++ b/enums/State.html @@ -1,5 +1,5 @@ -State | ts-fsrs

Enumeration State

Enumeration Members

Learning +State | ts-fsrs

Enumeration State

Enumeration Members

Enumeration Members

Learning: 1
New: 0
Relearning: 3
Review: 2

Generated using TypeDoc

\ No newline at end of file +

Enumeration Members

Learning: 1
New: 0
Relearning: 3
Review: 2

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/createEmptyCard.html b/functions/createEmptyCard.html index e6b562e..1e2ade5 100644 --- a/functions/createEmptyCard.html +++ b/functions/createEmptyCard.html @@ -1 +1 @@ -createEmptyCard | ts-fsrs

Function createEmptyCard

Generated using TypeDoc

\ No newline at end of file +createEmptyCard | ts-fsrs

Function createEmptyCard

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/date_diff.html b/functions/date_diff.html index 9b62e95..59b2081 100644 --- a/functions/date_diff.html +++ b/functions/date_diff.html @@ -1 +1 @@ -date_diff | ts-fsrs

Function date_diff

  • Parameters

    • now: Date
    • pre: Date
    • unit: unit

    Returns number

Generated using TypeDoc

\ No newline at end of file +date_diff | ts-fsrs

Function date_diff

  • Parameters

    • now: Date
    • pre: Date
    • unit: unit

    Returns number

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/date_scheduler.html b/functions/date_scheduler.html index 2e18fcf..42af550 100644 --- a/functions/date_scheduler.html +++ b/functions/date_scheduler.html @@ -3,4 +3,4 @@
  • t: number

    时间偏移量,当 isDay 为 true 时表示天数,为 false 时表示分钟

  • Optional isDay: boolean

    (可选)是否按天数单位进行偏移,默认为 false,表示按分钟单位计算偏移

  • Returns Date

    偏移后的日期和时间对象

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/fixDate.html b/functions/fixDate.html index 521543f..1445fe3 100644 --- a/functions/fixDate.html +++ b/functions/fixDate.html @@ -1 +1 @@ -fixDate | ts-fsrs

    Function fixDate

    • Parameters

      • value: unknown

      Returns Date

    Generated using TypeDoc

    \ No newline at end of file +fixDate | ts-fsrs

    Function fixDate

    • Parameters

      • value: unknown

      Returns Date

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/fixRating.html b/functions/fixRating.html index af139f3..d32bd99 100644 --- a/functions/fixRating.html +++ b/functions/fixRating.html @@ -1 +1 @@ -fixRating | ts-fsrs

    Function fixRating

    Generated using TypeDoc

    \ No newline at end of file +fixRating | ts-fsrs

    Function fixRating

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/fixState.html b/functions/fixState.html index 950ab50..b0af85f 100644 --- a/functions/fixState.html +++ b/functions/fixState.html @@ -1 +1 @@ -fixState | ts-fsrs

    Function fixState

    Generated using TypeDoc

    \ No newline at end of file +fixState | ts-fsrs

    Function fixState

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/formatDate.html b/functions/formatDate.html index 49eb683..0a7d28d 100644 --- a/functions/formatDate.html +++ b/functions/formatDate.html @@ -1 +1 @@ -formatDate | ts-fsrs

    Function formatDate

    • Parameters

      • date: Date

      Returns string

    Generated using TypeDoc

    \ No newline at end of file +formatDate | ts-fsrs

    Function formatDate

    • Parameters

      • date: Date

      Returns string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/fsrs-1.html b/functions/fsrs-1.html index 3986ccf..20de354 100644 --- a/functions/fsrs-1.html +++ b/functions/fsrs-1.html @@ -1 +1 @@ -fsrs | ts-fsrs

    Function fsrs

    Generated using TypeDoc

    \ No newline at end of file +fsrs | ts-fsrs

    Function fsrs

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/generatorParameters.html b/functions/generatorParameters.html index 1b79f56..9b468d9 100644 --- a/functions/generatorParameters.html +++ b/functions/generatorParameters.html @@ -1 +1 @@ -generatorParameters | ts-fsrs

    Function generatorParameters

    Generated using TypeDoc

    \ No newline at end of file +generatorParameters | ts-fsrs

    Function generatorParameters

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/show_diff_message.html b/functions/show_diff_message.html index dce2bbd..f01ffc9 100644 --- a/functions/show_diff_message.html +++ b/functions/show_diff_message.html @@ -1 +1 @@ -show_diff_message | ts-fsrs

    Function show_diff_message

    • Parameters

      • due: Date
      • last_review: Date
      • Optional unit: boolean
      • timeUnit: string[] = TIMEUNITFORMAT

      Returns string

    Generated using TypeDoc

    \ No newline at end of file +show_diff_message | ts-fsrs

    Function show_diff_message

    • Parameters

      • due: Date
      • last_review: Date
      • Optional unit: boolean
      • timeUnit: string[] = TIMEUNITFORMAT

      Returns string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/index.html b/index.html index bb85726..120f491 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,10 @@

    Example

    import {createEmptyCard, formatDate, fsrs, generatorParameters, Rating, Grades} from 'ts-fsrs';

    const params = generatorParameters({ enable_fuzz: true });
    const f = fsrs(params);
    const card = createEmptyCard(new Date('2022-2-1 10:00:00'));// createEmptyCard();
    const now = new Date('2022-2-2 10:00:00');// new Date();
    const scheduling_cards = f.repeat(card, now);

    // console.log(scheduling_cards);
    Grades.forEach(grade => { // [Rating.Again, Rating.Hard, Rating.Good, Rating.Easy]
    const { log, card } = scheduling_cards[grade];
    console.group(`${Rating[grade]}`);
    console.table({
    [`card_${Rating[grade]}`]: {
    ...card,
    due: formatDate(card.due),
    last_review: formatDate(card.last_review as Date),
    },
    });
    console.table({
    [`log_${Rating[grade]}`]: {
    ...log,
    review: formatDate(log.review),
    },
    });
    console.groupEnd();
    console.log('----------------------------------------------------------------');
    });
    -

    More examples refer:

    +

    More refer:

    diff --git a/interfaces/Card.html b/interfaces/Card.html index 62aaca5..76d6013 100644 --- a/interfaces/Card.html +++ b/interfaces/Card.html @@ -1,4 +1,4 @@ -Card | ts-fsrs

    Interface Card

    Hierarchy

    • Card

    Properties

    difficulty +Card | ts-fsrs

    Interface Card

    Hierarchy

    • Card

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    lapses: number
    last_review?: Date
    reps: number
    scheduled_days: number
    stability: number
    state: State

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    lapses: number
    last_review?: Date
    reps: number
    scheduled_days: number
    stability: number
    state: State

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/FSRSParameters.html b/interfaces/FSRSParameters.html index b789242..b16f9d2 100644 --- a/interfaces/FSRSParameters.html +++ b/interfaces/FSRSParameters.html @@ -1,5 +1,5 @@ -FSRSParameters | ts-fsrs

    Interface FSRSParameters

    Hierarchy

    • FSRSParameters

    Properties

    enable_fuzz +FSRSParameters | ts-fsrs

    Interface FSRSParameters

    Hierarchy

    • FSRSParameters

    Properties

    enable_fuzz: boolean
    maximum_interval: number
    request_retention: number
    w: number[]

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    enable_fuzz: boolean
    maximum_interval: number
    request_retention: number
    w: number[]

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/ReviewLog.html b/interfaces/ReviewLog.html index c02ed2d..fd4e5c1 100644 --- a/interfaces/ReviewLog.html +++ b/interfaces/ReviewLog.html @@ -1,4 +1,4 @@ -ReviewLog | ts-fsrs

    Interface ReviewLog

    Hierarchy

    • ReviewLog

    Properties

    difficulty +ReviewLog | ts-fsrs

    Interface ReviewLog

    Hierarchy

    • ReviewLog

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    last_elapsed_days: number
    rating: Rating
    review: Date
    scheduled_days: number
    stability: number
    state: State

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    last_elapsed_days: number
    rating: Rating
    review: Date
    scheduled_days: number
    stability: number
    state: State

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/CardInput.html b/types/CardInput.html index 4ab5341..202ca84 100644 --- a/types/CardInput.html +++ b/types/CardInput.html @@ -1 +1 @@ -CardInput | ts-fsrs

    Type alias CardInput

    CardInput: Card & {
        state: StateType | State;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file +CardInput | ts-fsrs

    Type alias CardInput

    CardInput: Card & {
        state: StateType | State;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/DateInput.html b/types/DateInput.html index 245a4a2..3ad4a6a 100644 --- a/types/DateInput.html +++ b/types/DateInput.html @@ -1 +1 @@ -DateInput | ts-fsrs

    Type alias DateInput

    DateInput: Date | number | string

    Generated using TypeDoc

    \ No newline at end of file +DateInput | ts-fsrs

    Type alias DateInput

    DateInput: Date | number | string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/Grade.html b/types/Grade.html index 0bafde1..a917a34 100644 --- a/types/Grade.html +++ b/types/Grade.html @@ -1 +1 @@ -Grade | ts-fsrs

    Type alias Grade

    Grade: ExcludeManual<Rating>

    Generated using TypeDoc

    \ No newline at end of file +Grade | ts-fsrs

    Type alias Grade

    Grade: ExcludeManual<Rating>

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/RatingType.html b/types/RatingType.html index 0cab633..fc19549 100644 --- a/types/RatingType.html +++ b/types/RatingType.html @@ -1 +1 @@ -RatingType | ts-fsrs

    Type alias RatingType

    RatingType: "Again" | "Hard" | "Good" | "Easy"

    Generated using TypeDoc

    \ No newline at end of file +RatingType | ts-fsrs

    Type alias RatingType

    RatingType: "Again" | "Hard" | "Good" | "Easy"

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/RecordLog.html b/types/RecordLog.html index 96b687d..08ab791 100644 --- a/types/RecordLog.html +++ b/types/RecordLog.html @@ -1 +1 @@ -RecordLog | ts-fsrs

    Type alias RecordLog

    RecordLog: {
        [key in Grade]: RecordLogItem
    }

    Generated using TypeDoc

    \ No newline at end of file +RecordLog | ts-fsrs

    Type alias RecordLog

    RecordLog: {
        [key in Grade]: RecordLogItem
    }

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/RecordLogItem.html b/types/RecordLogItem.html index 8bbf813..b7ee795 100644 --- a/types/RecordLogItem.html +++ b/types/RecordLogItem.html @@ -1 +1 @@ -RecordLogItem | ts-fsrs

    Type alias RecordLogItem

    RecordLogItem: {
        card: Card;
        log: ReviewLog;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file +RecordLogItem | ts-fsrs

    Type alias RecordLogItem

    RecordLogItem: {
        card: Card;
        log: ReviewLog;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/StateType.html b/types/StateType.html index b14e709..9ded74a 100644 --- a/types/StateType.html +++ b/types/StateType.html @@ -1 +1 @@ -StateType | ts-fsrs

    Type alias StateType

    StateType: "New" | "Learning" | "Review" | "Relearning"

    Generated using TypeDoc

    \ No newline at end of file +StateType | ts-fsrs

    Type alias StateType

    StateType: "New" | "Learning" | "Review" | "Relearning"

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/double.html b/types/double.html index 8a4f009..6e208d8 100644 --- a/types/double.html +++ b/types/double.html @@ -1 +1 @@ -double | ts-fsrs

    Type alias double

    double: number & {
        __double__: void;
    }

    Type declaration

    • __double__: void

    Generated using TypeDoc

    \ No newline at end of file +double | ts-fsrs

    Type alias double

    double: number & {
        __double__: void;
    }

    Type declaration

    • __double__: void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/int.html b/types/int.html index bc07da3..acd81a8 100644 --- a/types/int.html +++ b/types/int.html @@ -1 +1 @@ -int | ts-fsrs

    Type alias int

    int: number & {
        __int__: void;
    }

    Type declaration

    • __int__: void

    Generated using TypeDoc

    \ No newline at end of file +int | ts-fsrs

    Type alias int

    int: number & {
        __int__: void;
    }

    Type declaration

    • __int__: void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/FSRSVersion.html b/variables/FSRSVersion.html index 808a373..596508c 100644 --- a/variables/FSRSVersion.html +++ b/variables/FSRSVersion.html @@ -1 +1 @@ -FSRSVersion | ts-fsrs

    Variable FSRSVersionConst

    FSRSVersion: string = "3.1.0"

    Generated using TypeDoc

    \ No newline at end of file +FSRSVersion | ts-fsrs

    Variable FSRSVersionConst

    FSRSVersion: string = "3.1.1"

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/Grades.html b/variables/Grades.html index 9fca5d0..91a7370 100644 --- a/variables/Grades.html +++ b/variables/Grades.html @@ -1 +1 @@ -Grades | ts-fsrs

    Variable GradesConst

    Grades: Grade[] = ...

    Generated using TypeDoc

    \ No newline at end of file +Grades | ts-fsrs

    Variable GradesConst

    Grades: Grade[] = ...

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/default_enable_fuzz.html b/variables/default_enable_fuzz.html index bdaae2c..600a5db 100644 --- a/variables/default_enable_fuzz.html +++ b/variables/default_enable_fuzz.html @@ -1 +1 @@ -default_enable_fuzz | ts-fsrs

    Variable default_enable_fuzzConst

    default_enable_fuzz: false = false

    Generated using TypeDoc

    \ No newline at end of file +default_enable_fuzz | ts-fsrs

    Variable default_enable_fuzzConst

    default_enable_fuzz: false = false

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/default_maximum_interval.html b/variables/default_maximum_interval.html index 64ed185..4f576a1 100644 --- a/variables/default_maximum_interval.html +++ b/variables/default_maximum_interval.html @@ -1 +1 @@ -default_maximum_interval | ts-fsrs

    Variable default_maximum_intervalConst

    default_maximum_interval: 36500 = 36500

    Generated using TypeDoc

    \ No newline at end of file +default_maximum_interval | ts-fsrs

    Variable default_maximum_intervalConst

    default_maximum_interval: 36500 = 36500

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/default_request_retention.html b/variables/default_request_retention.html index 21ede7f..3a1873b 100644 --- a/variables/default_request_retention.html +++ b/variables/default_request_retention.html @@ -1 +1 @@ -default_request_retention | ts-fsrs

    Variable default_request_retentionConst

    default_request_retention: 0.9 = 0.9

    Generated using TypeDoc

    \ No newline at end of file +default_request_retention | ts-fsrs

    Variable default_request_retentionConst

    default_request_retention: 0.9 = 0.9

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/default_w.html b/variables/default_w.html index e1f55c8..dcd09cf 100644 --- a/variables/default_w.html +++ b/variables/default_w.html @@ -1 +1 @@ -default_w | ts-fsrs

    Variable default_wConst

    default_w: number[] = ...

    Generated using TypeDoc

    \ No newline at end of file +default_w | ts-fsrs

    Variable default_wConst

    default_w: number[] = ...

    Generated using TypeDoc

    \ No newline at end of file