Have similar search on your own system such as github or stackoverflow.
unsearch is a simple library designed to add flexible search functionality to your own APIs and databases.
pnpm add unsearch
Here is an example of a search text.
const example1 = 'name:john'
const example2 = 'test name:john'
const example3 = 'name:>john' // 'name:>=john' 'name:<john' 'name:<=john' 'name:<like>john' 'name:<ilike>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
pnpm install to install the dependencies.pnpm build to build the bundle.pnpm start to start the bundle.pnpm lint to lint the code. (You can also run pnpm lint:fix to fix the linting errors.)pnpm test to run the tests. (You can also run pnpm test:watch to run the tests in watch mode.)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.MIT License © 2024-PRESENT productdevbook
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.