From 703e03aba33f234712206769f57717ba7d92d23d Mon Sep 17 00:00:00 2001 From: LinuxWizard42 Date: Wed, 12 Oct 2022 22:54:37 +0300 Subject: Added export_allowed file to make repository visible in cgit --- node_modules/throttleit/example.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 node_modules/throttleit/example.js (limited to 'node_modules/throttleit/example.js') diff --git a/node_modules/throttleit/example.js b/node_modules/throttleit/example.js new file mode 100644 index 0000000..a7f0f62 --- /dev/null +++ b/node_modules/throttleit/example.js @@ -0,0 +1,14 @@ + +var throttle = require('./'); + +function onprogress(n) { + console.log('progress %s%', n); +} + +onprogress = throttle(onprogress, 500); + +var n = 0; +setInterval(function(){ + if (n >= 100) return; + onprogress(n++); +}, 50); -- cgit v1.2.3-86-g962b