Textwrap for javascript/nodejs. Correctly handles wide characters (宽字符) and emojis (😃). Wraps strings with option to break on words.
Get index of character after which variable 'word' must be broken given variable 'length' (accounts for wide characters).
wrap long lines of text using foreignObject tags or tspans as appropriate, depending on browser support
A vue-directive for svg text elements enabling autowrapping text
ES2015 tagged template string for removing indent from strings