{"id":16213050,"url":"https://github.com/productdevbook/unsearch","last_synced_at":"2025-03-19T09:31:02.321Z","repository":{"id":219875325,"uuid":"750151115","full_name":"productdevbook/unsearch","owner":"productdevbook","description":"Have similar search on your own system such as github or stackoverflow.","archived":false,"fork":false,"pushed_at":"2025-03-13T00:02:01.000Z","size":8125,"stargazers_count":20,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T01:18:33.707Z","etag":null,"topics":["search"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/productdevbook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["productdevbook"]}},"created_at":"2024-01-30T04:36:48.000Z","updated_at":"2024-05-16T07:42:12.000Z","dependencies_parsed_at":"2024-10-27T20:28:49.718Z","dependency_job_id":"1b1b1573-c686-4377-a5f5-f195520e0303","html_url":"https://github.com/productdevbook/unsearch","commit_stats":null,"previous_names":["productdevbook/unsearch"],"tags_count":2,"template":false,"template_full_name":"productdevbookcom/ts-bundle-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productdevbook%2Funsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productdevbook%2Funsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productdevbook%2Funsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productdevbook%2Funsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/productdevbook","download_url":"https://codeload.github.com/productdevbook/unsearch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982141,"owners_count":20378605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["search"],"created_at":"2024-10-10T10:54:29.720Z","updated_at":"2025-03-19T09:30:59.674Z","avatar_url":"https://github.com/productdevbook.png","language":"TypeScript","funding_links":["https://github.com/sponsors/productdevbook"],"categories":[],"sub_categories":[],"readme":"# unsearch\n\nunsearch is a simple library designed to add flexible search functionality to your own APIs and databases.\n\n## Features\n\n- Pluggable architecture\n  - Plugins\n    - [x] andScope / AND\n    - [x] orScope / OR\n    - [x] orderByScope / asc:xx, desc:xx asc:[xx, xx], desc:[xx, xx]\n    - [x] textScope / hello world\n    - [x] twoPointScope / xx:xx yy:yy xx:\u003eyy xx:\u003e=yy xx:\u003cyy xx:\u003c=yy xx:\u003clike\u003eyy xx:\u003cilike\u003eyy and more\n    - [ ] limitScope\n    - [ ] offsetScope\n- key:value scope search\n- asc:key or desc:key sort search\n- limit:count limit search (soon)\n- offset:count offset search (soon)\n- key:value OR key:value orScope search\n- key:value AND key:value andScope search\n\n\u003cp\u003e\n      \u003ca href=\"https://www.npmjs.com/package/unsearch\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/unsearch.svg?style=flat\u0026colorA=002438\u0026colorB=28CF8D\" alt=\"Version\"\u003e\u003c/a\u003e\n      \u003ca href=\"https://www.npmjs.com/package/unsearch\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/unsearch.svg?style=flat\u0026colorA=002438\u0026colorB=28CF8D\" alt=\"Downloads\"\u003e\u003c/a\u003e\n      \u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/productdevbookcom/unsearch.svg?style=flat\u0026colorA=002438\u0026colorB=28CF8D\" alt=\"License\"\u003e\u003c/a\u003e\n      \u003ca href=\"https://github.com/productdevbook/unsearch\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/stars/productdevbookcom/unsearch.svg?style=social\u0026label=Star\u0026maxAge=2592000\" alt=\"Github Stars\"\u003e \u003c/a\u003e\n\u003c/p\u003e\n\n## Video\n\n[![unsearch](.github/assets/video-ss.png)](https://github.com/productdevbook/unsearch/raw/main/.github/assets/video.mp4)\n\n## Installation\n\n```bash\npnpm add unsearch\n```\n\n## Usage\n\n- [Drizzle ORM Example](/playground/drizzle.ts)\n\n### Search Text\nHere is an example of a search text.\n\n```ts\nconst example1 = 'name:john'\nconst example2 = 'test name:john'\nconst example3 = 'name:\u003ejohn' // 'name:\u003e=john' 'name:\u003cjohn' 'name:\u003c=john' 'name:\u003clike\u003ejohn' 'name:\u003cilike\u003ejohn'\nconst example2 = 'name:john age:20'\nconst example3 = 'name:john age:20 OR name:doe age:30'\nconst example4 = 'name:john age:20 AND name:doe age:30'\nconst example5 = 'name:john asc:age'\nconst example6 = 'name:john desc:age'\nconst example8 = 'name:john AND email:test@gmail.com asc:age name:doe OR age:30'\nconst example7 = 'name:john asc:age limit:10' // soon\n```\n\n## TODO\n\n- [ ] Add limitScope\n- [ ] Add offsetScope\n- [ ] Usege examples\n  - [ ] Prisma\n  - [ ] TypeORM\n  - [ ] Sequelize\n  - [ ] Knex\n  - [ ] Postgres\n  - [ ] MySQL\n  - [ ] MongoDB\n  - [ ] SQLite\n  - [ ] MariaDB\n- [ ] Add more tests\n- [ ] Add more docs\n\n## Development\n\n1. To use this template, click the \"Use this template\" button above.\n2. Clone the repository to your local machine.\n3. Run `pnpm install` to install the dependencies.\n4. Run `pnpm build` to build the bundle.\n5. Run `pnpm start` to start the bundle.\n6. Run `pnpm lint` to lint the code. (You can also run `pnpm lint:fix` to fix the linting errors.)\n7. Run `pnpm test` to run the tests. (You can also run `pnpm test:watch` to run the tests in watch mode.)\n8. Run `pnpm release` to bump the version. Terminal will ask you to select the version type. And then it will automatically commit and push the changes. GitHub Actions will automatically publish git tags. NPM local registry will automatically publish the package.\n\n## Sponsors\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/oku-ui/static/sponsors/sponsors.svg\"\u003e\n    \u003cimg alt=\"sponsors\" src='https://cdn.jsdelivr.net/gh/oku-ui/static/sponsors/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## License\n\nMIT License © 2024-PRESENT [productdevbook](https://github.com/productdevbook)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproductdevbook%2Funsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproductdevbook%2Funsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproductdevbook%2Funsearch/lists"}