Skip to content

Instantly share code, notes, and snippets.

View wondermike221's full-sized avatar

Michael wondermike221

View GitHub Profile
@wondermike221
wondermike221 / wordle_finder.js
Created August 14, 2023 16:52
Wordle Finder
// Use on https://raw.githubusercontent.com/chidiwilliams/wordle/main/src/data/words.json
let dataURL = 'https://raw.githubusercontent.com/chidiwilliams/wordle/main/src/data/words.json';
let preTag, all;
async function getData() {
if(window.location.href == dataURL) {
preTag = document.querySelector('pre');
all = JSON.parse(preTag.textContent);
} else {
const response = await fetch(dataURL);
const words = await response.json();
@wondermike221
wondermike221 / wordleFilter.js
Created April 20, 2023 15:36
Helper function to filter the all wordle list.
// Use on https://raw.githubusercontent.com/chidiwilliams/wordle/main/src/data/words.json
const preTag = document.querySelector('pre');
const all = JSON.parse(preTag.textContent);
/**
* Filters the all array to return only the wordles that match the given criteria.
* @param excludedLetters String of letters to exclude from the wordle.
* @param includedLetters String of letters to include in the wordle.
* @param positionalChecks Function that takes a item and returns true if it passes the positional checks. e.g. (item) => item[0] === 'a' && item[1] === 'b'
* @returns String[] of possible wordles.

Keybase proof

I hereby claim:

  • I am wondermike221 on github.
  • I am mike_o_kondria (https://keybase.io/mike_o_kondria) on keybase.
  • I have a public key ASAAxp6BP0YokF67JdCjQT-q4MsZyXKDYncXwJbu5rsc6go

To claim this, I am signing this object: