mwg API
    Preparing search index...

    Function emitModule

    • Emits the compiled game as an ES module that assigns it to variable.

      Parameters

      Returns string

      import { compile, emitModule } from '@datamoc/mw_games/mwl';

      console.log(emitModule(compile("[{ tag: 'game', schema: 0.1 }]")).startsWith('export const gameData')); // true