rsql
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.7 • Public • Published

    Build Status

    RESTful Query Language (RSQL)

    Utility to generate rsql query string

    Installation

    Using npm:

    $ npm i --save rsql
    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=100
     
    filter(ne('b', 'value'), or(eq('c', 'v2'), eq('d', 'v4'))).qs(); // $filter=(b!=value;(c==v2,d==v4))&$limit=100

    Install

    npm i rsql

    DownloadsWeekly Downloads

    16

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    11 kB

    Total Files

    11

    Last publish

    Collaborators

    • sianloong