From f7a4e19a947e952ff384e861636d9cd47820ce58 Mon Sep 17 00:00:00 2001 From: productdevbook Date: Tue, 30 Jan 2024 09:06:05 +0300 Subject: [PATCH] chore: add pluggable architecture options to README.md --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5e1eca..5dba338 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,15 @@ unsearch is a simple library designed to add flexible search functionality to yo ## Features -- Pluggable architecture ([andScope, orScope, sortScope, limitScope, offsetScope]) +- Pluggable architecture + - Plugins + - [x] andScope / AND + - [x] orScope / OR + - [x] orderByScope / asc:xx, desc:xx asc:[xx, xx], desc:[xx, xx] + - [x] textScope / hello world + - [x] twoPointScope / xx:xx yy:yy + - [ ] limitScope + - [ ] offsetScope - key:value scope search - asc:key or desc:key sort search - limit:count limit search (soon) @@ -12,6 +20,14 @@ unsearch is a simple library designed to add flexible search functionality to yo - key:value OR key:value orScope search - key:value AND key:value andScope search +

+ Version + Downloads + License + + Github Stars +

+ ## Video [![unsearch](.github/assets/video-ss.png)](https://github.com/productdevbook/unsearch/raw/main/.github/assets/video.mp4) @@ -26,6 +42,20 @@ pnpm add unsearch - [Drizzle ORM Example](/playground/drizzle.ts) +### Search Text +Here is an example of a search text. + +```ts +const example1 = 'name:john' +const example2 = 'name:john age:20' +const example3 = 'name:john age:20 OR name:doe age:30' +const example4 = 'name:john age:20 AND name:doe age:30' +const example5 = 'name:john asc:age' +const example6 = 'name:john desc:age' +const example8 = 'name:john AND email:test@gmail.com asc:age name:doe OR age:30' +const example7 = 'name:john asc:age limit:10' // soon +``` + ## TODO - [ ] Add limitScope @@ -74,4 +104,4 @@ pnpm add unsearch ## License -This project is licensed under the [MIT License](LICENSE). +MIT License © 2022-PRESENT [productdevbook](https://github.com/productdevbook)