NOTE: The indications of the problem are vague, so it is a compromise between utility vs complexity.
Given a text, list every unique word with its frequency. Assume case insensitive discrimination, e.g.: Ruin = rUin
How people consider this problem: Mid-complexity
Check it online as a GitHub Page: https://xgrois.github.io/wordfreq-js/