line-offsets

Given a string, find the character offset for the beginning of each line

Usage no npm install needed!

<script type="module">
  import lineOffsets from 'https://cdn.skypack.dev/line-offsets';
</script>

README

line-offsets

Given a string, find the character offset for the beginning of each line.

Build Status

Usage

See test.js for an example.

License

MIT