I'm looking for a NPM package that has a function of splitting text based on overflow, more specifically for DOM (I do have the width and height of the container, but I use the Verdana font for the text). For example, given this:
.----------------.
| some text that |
| is too large | for this div
`----------------´
This should output:
['some text that is too large', 'for this div']