Words Ninja2019

JavaScript
npm
GitHub Repository

Split text without spaces into a list of words in JavaScript

Teligro – WordPress Tab

For a recent project, I needed a way to split strings containing English words into separate words. My stack is Node.js, and no existing package met my needs.

For example, I needed the string “youneedtolearnfromyourmistakes” split into “You Need To Learn From Your Mistakes”.

After searching for a suitable solution and building on some open-source projects, I developed a package to split strings into words. The package, called “wordsninja,” has been released.

Install

Install with npm

npm install wordsninja --save

Documentation

https://github.com/parsakafi/wordsninja

https://npmjs.com/package/wordsninja

Headshot of Parsa

Hi, I'm Parsa. I'm a software engineer, and I build and fix web apps for WooCommerce store owners, WordPress product teams, and Laravel startups that need a senior contractor they can ship with this week. You can follow me on X, see some of my work on GitHub, or read more about me on about page.