0.0.8 • Published 4 years ago

sem1083.fuzzy v0.0.8

Weekly downloads
8
License
ISC
Repository
-
Last release
4 years ago

Sem1083.fuzzy

Sem1083.fuzzy is a node.js package used for approximate string matching.

Installation

Use the package manager npm to install this package.

npm install sem1083.fuzzy

Usage

compare -> Compare two strings. This will return a score between 0 and 1.

let x = require(`sem1083.fuzzy`);

x.compare('fuzy','fuzzy')
//=> 0.8571428571428571

filter -> Compare a string with an array of strings. Will return a sorted array with the first entry being the best and the last the worst.

let x = require(`sem1083.fuzzy`);

x.filter('fuzy',['fuzzy','fuzy'])
//=> [ [Object], [Object], get: [Function] ]
//=> First object: { string: 'fuzy', score: 1 }

x.filter('fuzy',['fuzzy','fuzy']).get(0,1) //.get is slice but fancy
//=> [ [Object], get: [Function] ]
0.0.8

4 years ago

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago