Check one [hook] call's own attributes against its declaration. Returns nothing for a hook the game declares without attributes: an undeclared shape is not this function's to invent.
[hook]
import { validateHookAttributes } from '@datamoc/mw_games/mwl';const node = { tag: 'hook', attributes: { name: 'command:mark', value: 'ok' }, children: [], location: undefined };console.log(validateHookAttributes(node, { id: 'command:mark', attributes: { value: 'string' } })); // [] Copy
import { validateHookAttributes } from '@datamoc/mw_games/mwl';const node = { tag: 'hook', attributes: { name: 'command:mark', value: 'ok' }, children: [], location: undefined };console.log(validateHookAttributes(node, { id: 'command:mark', attributes: { value: 'string' } })); // []
Check one
[hook]call's own attributes against its declaration. Returns nothing for a hook the game declares without attributes: an undeclared shape is not this function's to invent.