
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
cel-js is a powerful and efficient parser and evaluator for Google's Common Expression Language (CEL), built on the robust foundation of the Chevrotain parsing library. This library aims to provide a seamless and easy-to-use interface for working with CEL in JavaScript environments.
Try out cel-js in your browser with the live demo.
condition ? true : false)&&)||)==, !=)<, <=, >, >=, in)+, -, *, /, %)foo.bar)foo["bar"])has, size, etc.)
e.all(x, p))e.exists(x, p))e.exists_one(x, p))e.filter(x, p))has(foo.bar))e.map(x, t) and e.map(x, p, t))size(foo))!true, -123)myFunction())// This is a comment)To install cel-js, use npm:
npm i cel-js
evaluateevaluate is the primary function for parsing and evaluating CEL expressions. It takes an expression string and an optional object of variables to use in the expression.
import { evaluate, parse } from 'cel-js'
// use `evaluate` to parse and evaluate an expression
evaluate('2 + 2 * 2') // => 6
evaluate('"foo" + "bar"') // => 'foobar'
evaluate('user.role == "admin"', { user: { role: 'admin' } }) // => true
parseparse is a lower-level function that only parses an expression string into an AST. This can be useful if you want to evaluate the expression multiple times with different variables or if you want to validate the syntax of an expression.
// use `parse` to parse an expression, useful for validation purposes
const result = parse('2 + a')
if (!result.isSuccess) {
// your business logic
}
// you can reuse the result of `parse` to evaluate the expression
evaluate(result.cst, { a: 2 }) // => 4
evaluate(result.cst, { a: 4 }) // => 6
FAQs
Common Expression Language (CEL) evaluator for JavaScript
The npm package cel-js receives a total of 24,417 weekly downloads. As such, cel-js popularity was classified as popular.
We found that cel-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.