@terra-dev/audit-fastdom
v0.20.1
Published
Deduplicate [fastdom](https://www.npmjs.com/package/fastdom) callbacks.
Downloads
12
Readme
@terra-dev/audit-fastdom
Deduplicate fastdom callbacks.
API
export function auditMeasure(fn: () => void): () => void {}
Usage
//import { measure } from 'fastdom'
//
//window.addEventListener('wheel', () => {
// measure(() => {
// // do fastdom measure action
// })
//})
import { auditMeasure } from '@terra-dev/audit-fastdom';
const callback = auditMeasure(() => {
// do fastdom measure action
});
window.addEventListener('wheel', () => {
callback();
});