line-offsets Given a string, find the character offset for the beginning of each line. Usage See test.js for an example. License MIT