Function to add ids to each TEXT_NODE in the given document.
Install
npm i add-ids-to-document
Usage
import { addIdsToWords } from 'add-ids-to-document';
// Pass a Document to the function
addIdsToWords(doc);
// Output: returns a new document with sequential ids in each TEXT_NODE