ESQ (Elasticsearch Query) is a JavaScript library designed to simplify the construction of Elasticsearch queries by providing a programmatic API to build complex JSON query objects. Its primary function is to abstract away the repetitive object creation inherent in crafting Elasticsearch DSL, allowing developers to focus on the query logic rather than the structural boilerplate. The current stable version is 1.0.0, which was last updated in April 2016. The project appears to be abandoned, with no significant updates or maintenance activity since then. It differentiates itself by offering a concise, chainable syntax for deeply nested query structures, making it easier to read and write complex queries compared to manual JSON object manipulation.
npm install esqVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize ESQ and incrementally build a complex boolean Elasticsearch query object.
Consider using more actively maintained Elasticsearch query builders or manually constructing query DSL for modern applications.
Ensure your project uses CommonJS (`require()`) when importing ESQ, or use a bundler that transpiles CommonJS to ESM if absolutely necessary (e.g., for browser builds).
Create a `declarations.d.ts` file with `declare module 'esq';` or more specific types if needed. Alternatively, disable type checking for ESQ imports.
Ensure you are importing ESQ using CommonJS syntax: `const ESQ = require('esq');`. If in a browser, ensure the `esq.js` script is loaded before `new ESQ()` is called.Run your application in a Node.js environment configured for CommonJS, or use a build tool (like Webpack or Rollup) that can transpile CommonJS modules for ESM or browser environments.
No dependency data recorded yet.