
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@skedulo/eql
Advanced tools
A TypeScript parser for Skedulo's Entity Query Language (EQL). This library provides tools for parsing and evaluating EQL filter expressions.
A TypeScript parser for Skedulo's Entity Query Language (EQL). This library provides tools for parsing and evaluating EQL filter expressions.
npm install @skedulo/eql
# or
yarn add @skedulo/eql
You can use this library in several ways:
import { evaluateFilter } from "@skedulo/eql";
const event = {
Current: { JobStatus: "Ready" },
Previous: { JobStatus: "Dispatched" },
};
const result = evaluateFilter("Current.JobStatus == 'Ready'", event);
console.log(result); // true
import { parseFilter, evaluateExpression } from "@skedulo/eql";
// Parse the filter expression into an AST
const ast = parseFilter("Current.JobStatus == 'Ready'");
// Later, evaluate it against an event
const result = evaluateExpression(ast, event);
import { parseFilter, stringify } from "@skedulo/eql";
// Parse a query into an AST
const ast = parseFilter("Current.JobStatus == 'Ready' AND priority > 5");
// Convert the AST back to a string
const queryString = stringify(ast);
console.log(queryString); // "Current.JobStatus == 'Ready' AND priority > 5"
This is useful for:
import { Expression, Event } from "@skedulo/eql";
function customEvaluator(expr: Expression, event: Event) {
// Your custom evaluation logic
}
==, !=LIKE, NOTLIKE (with % and _ wildcards)INAND, OR// Basic equality
"Current.JobStatus == 'Ready'";
// Comparison between paths
"Current.JobStatus != Previous.JobStatus";
// Pattern matching
"Current.Description LIKE '%urgent%'";
// List membership
"Current.Status IN ['Open', 'InProgress']";
// Complex expressions
"(Current.Status == 'Open' OR Current.Status == 'InProgress') AND Current.Priority == 'High'";
The stringify function converts parsed AST expressions back to EQL query strings. This enables round-trip conversion and query manipulation:
import { parseFilter, stringify } from "@skedulo/eql";
const ast = parseFilter("operation == 'INSERT'");
const queryString = stringify(ast);
// Result: "operation == 'INSERT'"
The stringifier normalizes all string literals to use single quotes:
const ast = parseFilter('operation == "INSERT"'); // Double quotes
const queryString = stringify(ast);
// Result: "operation == 'INSERT'" // Normalized to single quotes
The stringifier handles complex nested expressions with proper parenthesization:
const complexQuery = "(operation == 'UPDATE' OR operation == 'INSERT') AND Current.status != Previous.status";
const ast = parseFilter(complexQuery);
const regenerated = stringify(ast);
// Result: exact same string with proper parentheses preserved
==, !=, <, <=, >, >=, LIKE, NOTLIKE, IN, NOTIN)AND, OR) with proper parenthesizationCurrent.job.status)FAQs
A TypeScript parser for Skedulo's Entity Query Language (EQL). This library provides tools for parsing and evaluating EQL filter expressions.
We found that @skedulo/eql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 33 open source maintainers 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.