0.0.5 • Published 12 years ago

node-matchstats v0.0.5

Weekly downloads
4
License
-
Repository
github
Last release
12 years ago

MatchStats

Handy module for comparing the similarities in strings

Usage

  var matchStats = require('matchStats').matchStats;

  var str1 = 'information';
  var str2 = 'informative';

  var stats = matchStats( str1, str2 );

  console.log( stats.percent_matched ); // 73
  // percent similar

  console.log( stats.begin_match ); // 9
  // number of characters that appear in the same 
  // order at the beginning of each string