npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

unsearch

v0.0.2

Published

Unsearch smart key:value scope all database search. Compatible with any database.

Downloads

141

Readme

unsearch

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

Features

  • 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 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

Video

unsearch

Installation

pnpm add unsearch

Usage

Search Text

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:[email protected] asc:age name:doe OR age:30'
const example7 = '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. Run pnpm install to install the dependencies.
  4. Run pnpm build to build the bundle.
  5. Run pnpm start to start the bundle.
  6. Run pnpm lint to lint the code. (You can also run pnpm lint:fix to fix the linting errors.)
  7. Run pnpm test to run the tests. (You can also run pnpm test:watch to run the tests in watch mode.)
  8. 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.

Sponsors

License

MIT License © 2024-PRESENT productdevbook