# scim-query-filter-parser

> Parser for SCIM Filter Query Strings

Latest version **2.0.4** (published 2020-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install scim-query-filter-parser
pnpm add scim-query-filter-parser
yarn add scim-query-filter-parser
bun add scim-query-filter-parser
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2020-01-17 |
| First published | 2016-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 183.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Mike Marcacci |
| Maintainers | mike-marcacci |
| Keywords | scim, scimplecloud, parser, filter |

## Links

- npm: https://www.npmjs.com/package/scim-query-filter-parser
- Repository: https://github.com/the-control-group/scim-query-filter-parser-js
- Homepage: https://github.com/the-control-group/scim-query-filter-parser-js#readme
- Issues: https://github.com/the-control-group/scim-query-filter-parser-js/issues
- npm.io page: https://npm.io/package/scim-query-filter-parser

## Dependencies (1)

- [apg-lib](https://npm.io/package/apg-lib.md) ^3.2.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.4 (latest) — 2020-01-17
- 2.0.3 — 2020-01-17
- 2.0.2 — 2019-11-11
- 2.0.1 — 2019-10-03
- 2.0.0 — 2019-09-09
- 1.1.1 — 2019-08-28
- 1.1.0 — 2016-12-15
- 1.0.0 — 2016-12-15

## README

[![Build Status](https://travis-ci.org/the-control-group/scim-query-filter-parser-js.svg?branch=master)](https://travis-ci.org/the-control-group/scim-query-filter-parser-js)

## tl;dr

```js
import { compileFilter, compileSorter } from "scim-query-filter-parser";

const results = [{ userName: "somebody123" }, { userName: "somebody456" }]
  .filter(compileFilter('userName eq "somebody123"'))
  .sort(compileSorter("userName"));
```

## Description

This implements a parser and compiler for the [filtering](https://tools.ietf.org/html/rfc7644#section-3.4.2.2) and [sorting](https://tools.ietf.org/html/rfc7644#section-3.4.2.3) features defined in System for Cross-Domain Identity Management (SCIM) Protocol 2.0. It was originally built for use by [AuthX](https://github.com/the-control-group/authx);

## Methods & Properties

### `compileFilter(input: string): (data: any) => boolean`

Compile a SCIM filter expression into a function.

### `compileSorter(input: string): (a: any, b: any) => -1 | 0 | 1`

Compile a SCIM sort expression into a function.

---
_Source: https://npm.io/package/scim-query-filter-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
