How to use the expression-eval.compile function in expression-eval

To help you get started, we’ve selected a few expression-eval examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kalmhq / kalm / frontend / src / rbac / casbin / coreEnforcer.ts View on Github external
private getExpression(exp: string): Matcher {
    const matcherKey = exp;

    let expression = this.matcherMap.get(matcherKey);

    if (!expression) {
      expression = compile(exp);
      this.matcherMap.set(matcherKey, expression);
    }

    return expression;
  }

expression-eval

JavaScript expression parsing and evaluation.

MIT
Latest version published 12 months ago

Package Health Score

56 / 100
Full package analysis