Created
July 2, 2020 18:04
-
-
Save dubzzz/bc817691e8c7108003d918bafb3d8c08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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