Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fuzzy Comparison

Do you need to know if two strings are kind of the same? This package compares two string and tells you if they are similar enough.

CircleCI NPM Version License

yarn add fuzzy-comparison

Usage

import compare from 'fuzzy-comparison';

if (compare('Hello', 'Hallo')) {
  console.log(`It's a match!`);
}

You can adjust how sensitive the comparison is by adjusting the threshold which has a default value of 2.

import compare from 'fuzzy-comparison';

if (compare('foo', 'foobar', { threshold: 4 })) {
  console.log(`It's a match!`);
}

About

No description or website provided.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages