String similarity scoring as used in Jotto.
var jots = require('jots');
jots('bread', 'beard');
// => 5
$ npm install jots
var jots = require('jots');
Returns how many characters String guess
has in common with String
correct
. Assumes that guess
does not have any repeating letters,
otherwise this will happen:
jots('bread', 'eeeee');
// => 5