Given a string, find the character offset for the beginning of each line
npm install line-offsets
yarn add line-offsets
pnpm add line-offsets
bun add line-offsets
Given a string, find the character offset for the beginning of each line.
See test.js for an example.
MIT