Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/si3nloong/rsql
RSQL in typescript
https://github.com/si3nloong/rsql
query querystring rsql typescript
Last synced: 2 months ago
JSON representation
RSQL in typescript
- Host: GitHub
- URL: https://github.com/si3nloong/rsql
- Owner: si3nloong
- License: mit
- Created: 2019-12-11T01:51:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-31T11:00:29.000Z (8 months ago)
- Last Synced: 2024-09-28T21:15:54.336Z (4 months ago)
- Topics: query, querystring, rsql, typescript
- Language: TypeScript
- Homepage:
- Size: 912 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://github.com/si3nloong/rsql/workflows/test/badge.svg?branch=master)](https://github.com/si3nloong/rsql/actions)
### RESTful Query Language (RSQL)
Utility to generate rsql query string
# Installation
Using npm:
```bash
$ npm i --save rsql
``````javascript
import { filter, ne, or, eq, includes, notIncludes } from 'rsql';filter(
eq('name', 'test'),
includes('status', ['A', 'B', 'C']),
notIncludes('status', ['A', 'B', 'C']),
).qs(); // $filter=(name==test;status=in=A,B,C;status=nin=A,B,C)&$limit=100filter(ne('b', 'value'), or(eq('c', 'v2'), eq('d', 'v4'))).qs(); // $filter=(b!=value;(c==v2,d==v4))&$limit=100
```