1.3.1 • Published 7 years ago
text-store v1.3.1
Super performant text container built upon caches
Usage
Install
npm i text-storeLight it up
import TextStore from 'text-store';
const bigA$$File = new TextStore('really big file');Documentation
You might want it if:
You're working with really massive text files, and you will be doing frequent content manipulations here and there
You need to frequently convert between line:col based addressing and index based addressing
You will be doing both of above, thats the best use case, as
TextStoreuses caches, and re-computes only whats really neededYou have two libraries/apps where one uses line:col based addressing and other uses index based,
TextStorecan act as glue code
TextStorereally shines when an instance is used frequently and not just once or twice. First call to, for exampleindexToPositionwill be significantly slower as that's whenTextStorewill build it's internal cache, which is used to serve subsequent calls at lightning speeds