Offset and range mapper for string
npm install text-mapping 
``bash`
npm i text-mapping
`ts
const text = new Text('ab')
text.prependLeft(1, 'foo')
text.toString() // -> afoob
// find 'a' in generated string
text.generatedOffsetFor(0) // -> 0
// find 'f' in original string (cannot find 'f')
text.originalOffsetFor(1) // -> -1
``
MIT © fengzilong