🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@bufbuild/cel

Package Overview
Dependencies
Maintainers
7
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bufbuild/cel

A CEL evaluator for ECMAScript

0.1.0
latest
Source
npm
Version published
Weekly downloads
851
137.05%
Maintainers
7
Weekly downloads
 
Created
Source

@bufbuild/cel

This package provides a CEL evaluator 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

Keywords

javascript

FAQs

Package last updated on 02 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts