Skip to content
String similarity scoring as used in Jotto.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitattributes
.gitignore
.travis.yml
LICENSE.txt
README.md
index.js
package.json

README.md

jots

Build Status Dependency Status

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
Something went wrong with that request. Please try again.