When I originally wrote this I just ported the words code from lodash as it was battle-tested. Given it's had some updates/bugfixes, this should too to follow in step. I may have a look this weekend.
Also one of those code blocks got changed from purescript to pures. I spell it purse a lot on accident 😂