# @types/jsonquery

> TypeScript definitions for jsonquery

Latest version **0.1.4** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/jsonquery
pnpm add @types/jsonquery
yarn add @types/jsonquery
bun add @types/jsonquery
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-11-21 |
| First published | 2018-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/jsonquery
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonquery
- npm.io page: https://npm.io/package/@types/jsonquery

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 0.1.4 (latest) — 2023-11-21
- 0.1.1 (ts3.8) — 2021-12-24
- 0.1.0 (ts2.1) — 2018-11-01
- 0.1.3 — 2023-11-07
- 0.1.2 — 2023-10-18

## README

# Installation
> `npm install --save @types/jsonquery`

# Summary
This package contains type definitions for jsonquery (https://github.com/eugeneware/jsonquery).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonquery.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonquery/index.d.ts)
````ts
/// <reference types="node" />

declare function jsonquery<T>(query: jsonquery.Query<T>): NodeJS.ReadWriteStream;

declare namespace jsonquery {
    function match<T>(haystack: T, predicate: Query<T>): boolean;

    type Query<T> = BinaryQueryCondition<T> | QueryValue<T> | PathQuery;

    interface OrQueryCondition<T> {
        $or: ReadonlyArray<Query<T>>;
    }

    interface AndQueryCondition<T> {
        $and: ReadonlyArray<Query<T>>;
    }

    type BinaryQueryCondition<T> = OrQueryCondition<T> | AndQueryCondition<T>;

    interface BaseCondition<P> {
        $lt: P;
        $lte: P;
        $gt: P;
        $gte: P;
        $mod: [number, number];
        $ne: P;
        $in: readonly P[];
        $nin: readonly P[];
        $all: readonly P[];
        $elemMatch: Partial<P>;
    }

    interface PathQuery {
        [path: string]: any;
    }

    type QueryValue<T> = {
        [P in keyof T]?: T[P] | BaseCondition<T[P]>;
    };
}

export = jsonquery;

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by .

---
_Source: https://npm.io/package/@types/jsonquery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
