https://github.com/recursivefunk/matchstats
Module for comparing the similarities in strings
https://github.com/recursivefunk/matchstats
Last synced: 3 months ago
JSON representation
Module for comparing the similarities in strings
- Host: GitHub
- URL: https://github.com/recursivefunk/matchstats
- Owner: recursivefunk
- Created: 2012-09-18T22:17:35.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-09-18T22:23:15.000Z (almost 14 years ago)
- Last Synced: 2025-09-29T13:22:08.639Z (9 months ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MatchStats
## Handy module for comparing the similarities in strings
### Usage
```javascript
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
```