mwg API
    Preparing search index...

    Interface SessionOptions

    Counts how many times a game has been launched, persisted across page loads.

    Not an achievement, a quest counter, or anything a game reads to change its own behaviour: the one thing this exists for is the signal a native wrapper (Capacitor, Tauri, whatever a game ships through) needs to decide whether a player has used the game enough to plausibly be worth asking for a rating. mwg only counts; it never prompts, and has no opinion on what "enough" means.

    import { Session } from '@datamoc/mw_games/core';

    const session = new Session({ namespace: 'my-game' });
    if (session.launches === 5) {
    // a native wrapper's own moment to ask for a rating - mwg never prompts itself
    }
    interface SessionOptions {
        namespace?: string;
        storage?: SaveStorage;
    }
    Index
    namespace?: string

    namespaces the count, so two games sharing an origin never collide

    storage?: SaveStorage