Skip to content

tiaanduplessis/fuzzy-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fuzzy-finder

Tiny fuzzy searcher (Under 300 bytes gzipped)

npm package version npm downloads standard JS linter travis ci build status project license make a pull request Greenkeeper

Table of Contents

Install

$ npm install fuzzy-finder
# OR
$ yarn add fuzzy-finder

Or with CDN:

<script src="https://unpkg.com/fuzzy-finder@1.0.4/dist/fuzzy-finder.umd.js"></script>

Usage

import fuzzyFinder from 'fuzzy-finder'

console.log(fuzzy('da', [
    'dota.js',
    'stratures.js',
    'structures.js',
    'database.db',
    'user-data.js',
    'dummy-data.txt',
    'other.js'
]))
// [ { match: 'dota.js', rank: 0 },
//   { match: 'database.db', rank: 0 },
//   { match: 'user-data.js', rank: 5 },
//   { match: 'dummy-data.txt', rank: 0 } ]

Check out the example here.

Contributing

Contributions are welcome!

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Or open up a issue.

License

Licensed under the MIT License.

About

🔎 Tiny fuzzy searcher (356 Bytes gzipped)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published