Created
March 8, 2023 04:00
-
-
Save leonardovff/ea56d1fd71a6b1e5d810a6734025c407 to your computer and use it in GitHub Desktop.
get unique words from long plan text
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
JSON.stringify( | |
Object.keys(X.replace(/\n/g, ' ') | |
.split(" ") | |
.filter(x => x != "") | |
.filter(x => !['1','2','3','4','5', '6','7','8','9','0'].includes(x)).filter(x => x.length != 1) | |
.reduce((acc, word) => ({...acc, [word]: true}), {})) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment