/jots

String similarity scoring as used in Jotto.

Primary LanguageJavaScriptMIT LicenseMIT

jots

String similarity scoring as used in Jotto.

Example

var jots = require('jots');

jots('bread', 'beard');
// => 5

Installation

$ npm install jots

API

var jots = require('jots');

jots(correct, guess)

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