3.2.1 • Published 5 years ago

fuzzy-search v3.2.1

Weekly downloads
54,291
License
ISC
Repository
github
Last release
5 years ago

Fuzzy search

Simple lightweight Fuzzy Search library written in JavaScript, with zero dependencies!

Travis npm npm Donate

Installation

Using npm

npm install fuzzy-search --save

Using <script>

<script src="FuzzySearch.js"></script>

Quick start guide

// This can be excluded when loaded via <script>
import FuzzySearch from 'fuzzy-search'; // Or: var FuzzySearch = require('fuzzy-search');

const people = [{
  name: {
    firstName: 'Jesse',
    lastName: 'Bowen',
  },
  state: 'Seattle',
}];

const searcher = new FuzzySearch(people, ['name.firstName', 'state'], {
  caseSensitive: true,
});
const result = searcher.search('ess');

Documentation

const searcher = new FuzzySearch(<haystack>, [keys], [options]);
const result = searcher.search(<needle>);

haystack (type: Array)

Array of objects containing the search list.


keys (type: Array, default: [])

List of properties that will be searched. This also supports nested properties.


options (type: Object)

Object with options that will configure the search. Scroll/Swipe down to see more information on what options are available.


\<needle> (type: String, default: '')

The string to Fuzzy Search on.

Options

caseSensitive (type: Boolean, default: false)

Indicates whether comparisons should be case sensitive.

sort (type: Boolean, default: false)

When true it will sort the results by best match (when searching for abc in the search set ['a__b__c', 'abc'] it would return abc as the first result).

When false it will return the results in the original order.

dafunda-markdown-editor@midigator/styleguidealfred-emoji-localkontenbase-document-editorchonky-trrsytchonky-trryst@visualbi/ibcs-charts@infinitebrahmanuniverse/nolb-fuz@everything-registry/sub-chunk-1713tw-file-browser@dotien/chonky@compensa/rich-markdown-editor@comparto/git-c@complai/chonky@dinhbinh1610/dm-react-markdown-editor@routr/ctlkalamakalama-mplayerstyllo-markdown-editorvue-pancake-icons@aperturerobotics/chonky@archguard/archdoc-editor@ananthan-cloud/chonky-file-explorer@animech-public/chonky@ampolon/rich-markdown-editor-v2@andreyblinov/rich-markdown-editor@asterics-docs/vuepress-theme-docs@ashleyhyper/chonky@algoraven/crypto@akord/rich-markdown-editor@bhunter179/chonky@brizy/ui@brightlever/chonky@broncha/rich-markdown-editor@codetez/react-file-manager-ctz@brainfish-ai/rich-markdown-editor@davidilie/markdown-editor@devxm/pick-chunkszandorblipyoursoftrun-componentszerfznotes-editor@feedmepos/mf-inventory-portal@fedotxxl/prose-rich-editor@fedotxxl/rich-markdown-editor@fernando.lopes/chonky@hackernoon/rich-markdown-editor@hipop/rich-markdown-editor@first-approval/chonky@g4rcez/components@gaborottlik/rich-markdown-editor@geospatial/geometry-referential@kyna/editor@liwuming/rich-editor@mhaz42/chonky@mhaz42/react-chonky@markustroestler/file-explorer@marconunnari/rich-markdown-editor@mariuszbartnik/chonky@epallinone/chonky@fabriziospadaro/chonky@moaazsidat/rich-markdown-editor@justinc/sdf@justinc/sdfg@jhon-idrovo/rich-markdown-editor@jetsoms/rich-markdown-editor@i4o/oh-hi-markdown@i4o/ohm-old@raven-crypto/raven-crypto@povio/ui-kit@samuelncui/chonky@pick-chunks/pc@pnegahdar/rich-markdown-editor@nosferatu500/chonky@notea/rich-markdown-editor@noted-md/rich-markdown-editor@paragraph-xyz/rich-markdown-editor@sphinx-immer/op-kits@socialbaking/karma@snack-uikit/fields@snack-uikit/chips@soroker/chonky@servabofidem/chonky@rolebase/editormusic-instrumentsmetro-visualizernuchonkyopen-in-vscodeparatechchonkyrsharp-clireact-emoji-popup-listersats-ui-libselektorsaber-plugin-local-searchreact-hook-fuzzyreact-fields-keeperscripts-clineo-bash-lsplomoquick-markdown-editor
3.2.1

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.2

6 years ago

2.2.1

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.2.0

6 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.5.0

8 years ago

1.4.0

9 years ago

1.3.8

9 years ago

1.3.7

9 years ago

1.3.6

9 years ago

1.3.5

9 years ago

1.3.4

9 years ago

1.3.3

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago