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

artista-jql

v0.0.9

Published

Query Language for JSON

Downloads

9

Readme

artista-jql

Query language for JSON

Installation

$ npm install artista-jql

Browser

<script src="..../jql/dist/jql.js"></script>

node.js

const JQL = require('..../jql/dist/jql.js').JQL;

Quick Start

Filter following JSON data.

const items = [
  {
    id: 1,
    kb: true,
    foo: {
        bar: "FOO"
    }
  },
  {
    id: 2,
    kb: false,
    foo: {
        bar: "FOO"
    }
  },
  {
    id: 3,
    kb: false,
    foo: {
        bar: "BAR"
    }
  }
];

Query sample 1

const query = "kb = false";
const filteredItems = JQL.filter(query, items);

Return filtered items.

[
  {
    id: 2,
    kb: false
  },
  {
    id: 3,
    kb: false
  }
];

Query sample 2

const query = 'foo.bar = "BAR"';
const filteredItems = JQL.filter(query, items);

Return filtered items.

[
  {
    id: 3,
    kb: false
  }
];

Grammar

Supported data types for right value

| type | example | | --- | --- | | String | "foo", "bar", ... | | Number | 1, 200, -15, 14.5, ... | | Boolean | true false |

Logical Operators (case insensitive)

| operator | description | | --- | --- | | AND | logical conjunction | | OR | logical sum | | ! | logical negation |

Comparison Operators (case insensitive)

| operator | description | | --- | --- | | = | equal | | != | not equal | | >= | greater than or equal to | | <= | less than or equal to | | > | greater than | | < | less than | | CONTAINS | Check if right value contains left value when right value is StringOr check if right value is in left array when left value is Array |

Query examples

| | sample queries | description | |------|-----------------------------------------------------------|---------------------------| | Good | name = "hoge" | compare String | | Good | name contains "eorg" | partial match with String | | Good | age = 37, age < 30, age >= 3 | compare Number | | Good | flag = true | compare Boolean | | Good | name != "George" | not equal | | Good | person.age > 40 | JSON dot notation | | Good | k1 = "v1" AND k2 = "v2" | AND operator | | Good | k1 = "v1" OR k2 = "v2" | OR operator | | Good | k1 = "v1" AND k2 = "v2" ... AND kx= "vx" | multiple AND/OR operator | | BAD | k1 = "v1" AND k2 = "v2" OR k3 = "v3" | mixed logical operators | | Good | ! (name contains "eorg") | ! operator | | Good | (a = 1 AND b = 'foo') OR c = false | with brackets | | Good | (a = 1 OR b = 'foo') AND c = false | with brackets | | Good | (a = 1 OR b = 'foo') AND (c = false AND d CONTAINS 'bar') | with brackets | | BAD | ((a = 1 AND b = 'foo') OR c = false) AND d CONTAINS 'bar' | nested brackets |