1.0.11 • Published 6 years ago

sequencematcher v1.0.11

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

calculate two array's similarity, like difflib.SequenceMatcher().ratio() in python.

usage:

var sm = require('sequencematcher');

var array1 = [1, 2, 3];
var array2 = [1, 2];
var similarity = sm.sequenceMatcher(array1, array2);
console.log(similarity);  
//0.8

params:
Type must be array and length must equal 1 at least. otherwise it return -1;
It keeps same result no matter how sorted of params;

result:
similarity between 0 and 1 in normal.

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago