mwg API
    Preparing search index...

    Function isMwlId

    • The rule behind the id value type: an identifier, allowed (unlike ref) to carry the [...] index brackets a WML variable path uses, since [set_variable] name= and every reader that takes that name type it as id. Exported so readers.coerce shares one definition with the schema: a name the compiler accepts is a name an adapter's reader accepts, rather than the two drifting into disagreeing about what an id is.

      Parameters

      • value: string

      Returns boolean

      import { isMwlId } from '@datamoc/mw_games/mwl';

      console.log(isMwlId('party[0].name')); // true - a variable path is an `id`
      console.log(isMwlId('0bad')); // false - it does not start like an identifier