Socket
Book a DemoInstallSign in
Socket

acany

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acany

simple support to autocomplete

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

acany : simple support to autocomplete. receve a list and a word

return a list math in sort of less diff, but this not sort your initial list

I will help if you have any difficulty =)

Contact me by github:heyderpd. I'll be glad to help you.

Thanks for npm~lucasmreis

npm install --save acany

Example:

const acany = require('acany')

const list = [ 'hot coffee', 'chocolate', 'hot coffee with chocolate', 'coffee' ]

found = acany('coffee', list)
// found = [ 'coffee', 'hot coffee', 'hot coffee with chocolate' ]

found = acany('hot coffee', list)
// found = [ 'hot coffee', 'hot coffee with chocolate' ]

found = acany('hot chocolate', list)
// found = [ 'hot coffee with chocolate' ]

Full Example:

// acany(_NEED_, _LIST_, _LIMIT_)

const list = ['aaa', 'yxuu', 'abb', 'xbbc', 'xc', 'xx cc', 'bbc', 'ccc', 'xccc']

found = acany('xc', list)
// found = [ 'xc', 'xccc', 'xbbc', 'xx cc' ]

found = acany('x c', list)
// found = [ 'xbbc', 'xc', 'xx cc', 'xccc' ]

found = acany('x c', list, 2)
// found = [ 'xbbc', 'xc' ]

Keywords

autocomplete

FAQs

Package last updated on 11 Oct 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.