1.2.1 • Published 11 months ago

@icarowhyy/pnpjs-query v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

This library is intended to make it easier to write OData queries.

Overview

Features

  • Semantic
  • Typesafe
  • Secure

Basic Usage

const query = new Query().eq("name", "Test").and().eq("age", 1).build();

/* output
 name eq 'Test' and age eq 1
*/
const query = new Query().eq("name", "Test").or().eq("age", 1).build();
/* output
 name eq 'Test' or age eq 1
*/
const query = new Query().contains("name", "Test").build();
/* output
 contains(name, 'Test')
*/
const query = new Query().eq("age", 1).build();
/* output
 age eq 1
*/

const query = new Query().eq("name", "Whyy").build();
/* output
  name eq 'Whyy'
*/
const query = new Query().ge("name", "Test").build();
/* output
 age ge 'Test'
*/

const query = new Query().ge("age", 10).build();
/* output
  age ge 10
*/
const query = new Query().ge("createdAt", new Date()).build();

/* output
createdAt ge '2022-01-01T00:00:00.000Z'
*/

Install

npm i @icarowhyy/pnpjs-query

Contributing

We welcome contributions! To contribute to the project, get in touch.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you encounter any issues or have any questions, please open an issue on our GitHub repository.

1.2.1

11 months ago

1.2.0

11 months ago

1.1.4

12 months ago

1.1.3

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago