mwg API
    Preparing search index...

    Function parseHookReference

    • Parse a type:name hook reference, or null when it does not match.

      Parameters

      • value: string

      Returns { name: string; type: HookType } | null

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

      console.log(parseHookReference('predicate:holds')); // { type: 'predicate', name: 'holds' }
      console.log(parseHookReference('not-a-reference')); // null