Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DateFactory

Callable

  • DateFactory(...args: any[]): Date
  • Factory method that returns a new Date instance on each invocation.

    see

    withExpiration

    example
    export const store = stores.utils.withExpiration(stores.localStore(), function sevenDays() {
    const now = Date.now();
    const days = 24 * 60 * 60 * 1000;
    return new Date(now + 7 * days);
    });

    Parameters

    • Rest ...args: any[]

    Returns Date

    A Date object.