Skip to content

Instantly share code, notes, and snippets.

@dubzzz
Created July 2, 2020 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dubzzz/bc817691e8c7108003d918bafb3d8c08 to your computer and use it in GitHub Desktop.
Save dubzzz/bc817691e8c7108003d918bafb3d8c08 to your computer and use it in GitHub Desktop.
const shrinker = (character) => {
const derivedGenerator = miniFc.integer(0, 25);
const initialValue = character.codePointAt(0) - 97;
for (const shrunkValue of derivedGenerator.shrink(initialValue)) {
yield String.fromCharCode(97 + shrunkValue);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment