Skip to content

Search always with machs and highlights. search-plus-ts is server and client side searching library. and with text highlighting and marking.

License

Notifications You must be signed in to change notification settings

devgauravjatt/search-plus-ts

Repository files navigation

🔍 Search-Plus-Ts

chrome_jLiZ4DAmiC

Search always with machs and highlights.

search-plus-ts is server and client side searching library. and with text highlighting and marking.

GitHub License GitHub last commit NPM Downloads NPM Version


📚 Documentation

Full Guide and Examples With server and client react - 👩‍💻 With sever and react client

Full Guide and Examples With client react hook - 👩‍💻 Vite react client

🧨 More examples - 👩‍💻 More Examples

🚀 Features

  • Search always with machs
  • Highlighting and Marking
  • Work with any framework
  • Server and Client side searching
  • Easy to use

✨ Quick Start Code

// npm install search-plus-ts is required

import searchPlusTs from 'search-plus-ts'

const quotes = [
  {
    id: 1,
    quote:
      'Your heart is the size of an ocean. Go find yourself in its hidden depths.',
    author: 'Rumi',
  },
  {
    id: 2,
    quote:
      'The Bay of Bengal is hit frequently by cyclones. The months of November and May, in particular, are dangerous in this regard.',
    author: 'Abdul Kalam',
  },
  {
    id: 3,
    quote:
      'Thinking is the capital, Enterprise is the way, Hard Work is the solution.',
    author: 'Abdul Kalam',
  },
  {
    id: 4,
    quote: "If You Can'T Make It Good, At Least Make It Look Good.",
    author: 'Bill Gates',
  },
  {
    id: 5,
    quote:
      "Heart be brave. If you cannot be brave, just go. Love's glory is not a small thing.",
    author: 'Rumi',
  },
]

const SearchPlus = new searchPlusTs({
  data: quotes,
  keys: ['quote', 'author'],
})

const results = SearchPlus.search('heart yourself rumi')

console.log('🚀 results :-', results)
🚀 results :-  [
  {
    id: 1,
    quote: "Your heart is the size of an ocean. Go find yourself in its hidden depths.",
    author: "Rumi",
  }
]

About

Search always with machs and highlights. search-plus-ts is server and client side searching library. and with text highlighting and marking.

Topics

Resources

License

Stars

Watchers

Forks