New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@webkitty/searchbox

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webkitty/searchbox

A search box supporting multiple user-defined keywords.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

🌐 stuchl4n3k.net | 💻 stuchl4n3k | 🐦 @stuchl4n3k

Text input augmented with Lexer magic✨ to support advanced search features. Searchbox supports multiple user-defined keywords (filters, variables) and also NOT operator.

Features

  • Parses user input string into a structured formula of literals.
  • Supports literal negation.
  • Supports unicode.
  • Operators are configurable.

Usage

import * as searchbox from '@webkitty/searchbox';

const inputText = 'Never take title:raisins from -author:rabbits';
const keywords = ['title', 'author'];

const formula = searchbox.parse(inputText, {keywords});

// Formula:
//  _: [Never,take,from]	// words not matching any keyword (aka fulltext)
//  title: [raisins]		// "title" keyword match
//  -author: [rabbits]		// "author" keyword match with NOT operator ("-")

Please note that only case-sensitive keyword matching is supported.

📝 License

Copyright © 2019 stuchl4n3k. This project is MIT licensed.

FOSSA Status

Keywords

FAQs

Package last updated on 24 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc