@terra-dev/audit-fastdom
TypeScript icon, indicating that this package has built-in type declarations

0.20.1 • Public • Published

@terra-dev/audit-fastdom

Deduplicate fastdom callbacks.

img.png

API

index.ts

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();
});

Readme

Keywords

none

Package Sidebar

Install

npm i @terra-dev/audit-fastdom

Weekly Downloads

62

Version

0.20.1

License

Apache-2.0

Unpacked Size

39.1 kB

Total Files

6

Last publish

Collaborators

  • ssen