compare-words
v0.0.1
Published
wordle guess-validation functions
Downloads
1
Readme
Word Match
compare-words
is a small utility for assessing how much one word matches another.
It's inspired by https://www.powerlanguage.co.uk/wordle/.
Overview
- Takes two words of any size
- The second is compared to the first
- Compares words for precise and non-precise letter matches
- Returns an array of tuples revealing the second word letters and their precision against the first
Example
import assess from "compare-words";
assess("begal", "beans");
result
[
["b", "correct"],
["e", "correct"],
["a", "present"],
["n", "absent"],
["s", "absent"],
];
Resources
Copyright @ Michael Chan Licensed MIT