Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Have similar search on your own system such as github or stackoverflow.

License

NotificationsYou must be signed in to change notification settings

productdevbook/unsearch

Repository files navigation

unsearch is a simple library designed to add flexible search functionality to your own APIs and databases.

Features

  • Pluggable architecture
    • Plugins
      • andScope / AND
      • orScope / OR
      • orderByScope / asc:xx, desc:xx asc:[xx, xx], desc:[xx, xx]
      • textScope / hello world
      • twoPointScope / xx:xx yy:yy xx:>yy xx:>=yy xx:<yy xx:<=yy xx:yy xx:yy and more
      • limitScope
      • offsetScope
  • key:value scope search
  • asc:key or desc:key sort search
  • limit:count limit search (soon)
  • offset:count offset search (soon)
  • key:value OR key:value orScope search
  • key:value AND key:value andScope search

VersionDownloadsLicenseGithub Stars

Video

unsearch

Installation

pnpm add unsearch

Usage

Search Text

Here is an example of a search text.

constexample1='name:john'constexample2='test name:john'constexample3='name:>john'// 'name:>=john' 'name:<john' 'name:<=john' 'name:<like>john' 'name:<ilike>john'constexample2='name:john age:20'constexample3='name:john age:20 OR name:doe age:30'constexample4='name:john age:20 AND name:doe age:30'constexample5='name:john asc:age'constexample6='name:john desc:age'constexample8='name:john AND email:test@gmail.com asc:age name:doe OR age:30'constexample7='name:john asc:age limit:10'// soon

TODO

  • Add limitScope
  • Add offsetScope
  • Usege examples
    • Prisma
    • TypeORM
    • Sequelize
    • Knex
    • Postgres
    • MySQL
    • MongoDB
    • SQLite
    • MariaDB
  • Add more tests
  • Add more docs

Development

  1. To use this template, click the "Use this template" button above.
  2. Clone the repository to your local machine.
  3. Runpnpm install to install the dependencies.
  4. Runpnpm build to build the bundle.
  5. Runpnpm start to start the bundle.
  6. Runpnpm lint to lint the code. (You can also runpnpm lint:fix to fix the linting errors.)
  7. Runpnpm test to run the tests. (You can also runpnpm test:watch to run the tests in watch mode.)
  8. Runpnpm 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.

Sponsors

sponsors

License

MIT License © 2024-PRESENTproductdevbook

About

Have similar search on your own system such as github or stackoverflow.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp