Socket
Socket
Sign inDemoInstall

search-dot

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    search-dot

search module for javascript


Version published
Maintainers
1
Created

Readme

Source

Hello , this is a module for searching

How to use :

  • config :
const search = require('search-dot-js')
  • how to search :
search("l","hello world hello","hello") // [0 , 5]

search("g","hello world hello","hello") // [ [0 , 5] , [ 12 , 17 ] ]
  • what is operator :

Operators specify the type of search operation, operator l only finishes the operation by finding an item, but the g operator completes the search, generally using the operator l for conditional operations, of course there is no limit to this .

  • Other uses :
if(search('l','hello world','home')){
    console.log(true)
}else{
    console.log(false)
}

// false 

if(search('l','hello world','hello')){
    console.log(true)
}else{
    console.log(false)
}

// true

Keywords

FAQs

Last updated on 16 Jan 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc