@shopware-ag/meteor-component-library
Version:
The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).
1 lines • 745 B
Source Map (JSON)
{"version":3,"file":"debounce-b18437e2.mjs","sources":["../src/utils/debounce.ts"],"sourcesContent":["export function debounce<T extends (...args: any[]) => void>(\n func: T,\n delay: number,\n): (...args: any[]) => void {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n return function (this: any, ...args: any[]) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const context = this;\n clearTimeout(timeoutId);\n\n timeoutId = setTimeout(() => {\n func.apply(context, args);\n }, delay);\n };\n}\n"],"names":[],"mappings":"AAAgB,SAAA,SACd,MACA,OAC0B;AACtB,MAAA;AAEJ,SAAO,YAAwB,MAAa;AAE1C,UAAM,UAAU;AAChB,iBAAa,SAAS;AAEtB,gBAAY,WAAW,MAAM;AACtB,WAAA,MAAM,SAAS,IAAI;AAAA,OACvB,KAAK;AAAA,EAAA;AAEZ;"}