add-ids-to-document
v1.0.12
Published
helper to add ids to each word of the document
Downloads
1
Readme
Add ids to document
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