npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adobe/helix-querybuilder

v1.5.0

Published

Helix Querybuilder

Downloads

32

Readme

Helix Querybuilder

AEM Querybuilder for JavaScript (Browser, Node, Deno)

Status

codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript semantic-release

Installation

$ npm install @adobe/helix-querybuilder

Background

The AEM QueryBuilder is a Java and REST API for executing server-side queries using a custom Query Builder Language (QBL). QBL was designed to be:

  1. implementation agnostic
  2. HTML-form friendly (you should not need JavaScript to build a query)
  3. simple (no joins or projections)

QBL Language and Notation

As URL Query String

The most common way of expressing queries is as a query string appended to the URL of the resource that is able to execute queries. In the context of Project Helix, this would be the Helix Data Embed Action.

An example query might look like this:

https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v1/https://blogs.adobe.com/psirt/?feed=atom&hlx_property=author&hlx_property.value=svishnoi

The query is encoded in the URL parameters hlx_property=author&hlx_property.value=svishnoi.

As a multi-line text

This URL query string notation is most practical in day-to-day use, but a bit hard to read. Therefore a multi-line text notation is used that uses line breaks to separate key-value-pairs, does not use prefixes, nor URL-encoding:

property=author
property.value=svishnoi

As JSON or YAML

When using QBL in configuration files or JavaScript applications, it can be convenient to represent QBL in JSON like this:

{
  "property": {
    "property": "author",
    "value": "svishnoi"
  }
}

or as YAML like:

property:
  property: author
  value: svishnoi

In the following examples the multi-line and YAML notation will be used.

Of course, repeating the name of the predicate is boring and tedious, so the short-hand _ can be used instead of the inner repetition of the predicate name:

{
  "property": {
    "_": "author",
    "value": "svishnoi"
  }
}

or as YAML like:

property:
  _: author
  value: svishnoi

Usage

Simple Usage

import { qb } from '@adobe/querybuilder';

const filter = qb.filter(window.location.search);
const filtered = filter(dataarray);

Loading from JSON to create a filter

// other loaders are availale, e.g. text and url
import { load } from '@adobe/querybuilder/src/loaders/json.js'
// other adapters will be made available soon
import { adapt } from '@adobe/querybuilder/src/adapters/filter.js'

const qb = load(JSON.parse(input));
const filter = adapt(qb);

filter([
  { foo: 'bar'}
]);

API Reference

For more, see the API documentation.

Other Adapters

  • filter creates a function that filters an in-memory array
  • algolia returns a pair of search string and options that can be used with algoliasearch
  • odata creates an OData filter object that can be used with Azure cognitive search or Excel

Development

Build

$ npm install

Test

$ npm test

Lint

$ npm run lint

Developing Loaders

A loader must implement and export a load function that accepts a Query Builder Language representation in any form and returns a Query Builder AST object.

If you have the QBL as key-value pairs, then you can use { nest } from '@adobe/querybuilder/src/utils.js' for a quick transformation.