Skip to content
 
 

Repository files navigation

The Buf logo

CEL-ES

License NPM Version NPM Version

An implementation of Common Expression Language (CEL) for ECMAScript.

Example

Let's create a CEL environment, and define the variable name:

import { createEnv } from "@bufbuild/cel";
import { createRegistry } from "@bufbuild/protobuf";

const env = createEnv("", createRegistry());
env.set("name", "tacocat");

That's it. The environment is ready to be used for parsing and evaluation.

To parse and evaluate an expression, call run:

env.run(`
  name.startsWith('taco')
`); // true

Packages

Status: Beta

This project is in beta.

Legal

Offered under the Apache 2 license.

About

Common Expression Language for ECMAScript

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages