mwg API
    Preparing search index...

    Function checkConditionSyntax

    • Checks that a condition is well-formed and within the step bounds, without evaluating it: the variables are not known yet when a shared package is verified. Returns the identifiers it reads.

      Parameters

      • source: string

      Returns string[]

      import { checkConditionSyntax } from '@datamoc/mwg/mwl';

      console.log(checkConditionSyntax('self.hp <= self.maxHp / 4')); // ['self.hp', 'self.maxHp']