Word Wrapping for JavaScript

JSON →
library 5.1.1 ·javascript
verified May 27, 2026

wordwrapjs is a lightweight and versatile JavaScript library designed for word-wrapping plain text within specified column widths. Currently at version 5.1.1, it provides a stable and efficient solution for text formatting across various JavaScript environments. The library supports Node.js (both CommonJS and ECMAScript Modules), modern web browsers (via ESM imports), and older browser environments (via a global `window.wordwrapjs` object), enabling broad compatibility without requiring transpilation. Its API offers methods to wrap text into a single string or an array of lines, with options to force long words to break and control line trimming. The project emphasizes plain text processing, focusing on core word-wrapping logic rather than rich text features. Releases appear stable, with infrequent major version bumps, indicating a mature and well-tested codebase.

total hits 9
actors 3 distinct systems
last hit 7d ago Script
GPTBot
5
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France