@trynova-ai/auto-ids-js
v1.0.1
Published
Automatically inject ids into elements at runtime
Downloads
342
Readme
auto-ids-js
Automatically inject ids into elements at runtime
Installation
To use the Auto Ids package, install the package and initialize it in your application:
npm install @trynova-ai/auto-ids-js
Basic Usage
import testDataIdObserver from '@trynova-ai/auto-ids-js';
// Initialize the MutationObserver
const observer = testDataIdObserver();
// The observer will now monitor the DOM and assign 'data-testid' attributes
// to new 'input', 'button', and 'a' elements as they are added.