Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-match-finder

Oluwatob-i3MIT1.0.19

Match finder is a function that takes in a search input and an array to search and returns an array of matches.

react, search, filter, match, finder, find, recursive search

readme

Usage

import getMatches from 'react-match-finder'

const array = ('test', ['test', 'testing', {name: 'test'}, [{name: 'testing'}], 'nothing here'], 50)
const searchInput = 'test'
// match percentage
const percentMatch = 50
const matches = getMatches('test', array, percentMatch) //  returns ['test', 'testing', {name: 'test'}, [{name: 'testing'}]]