Tlence
debounce and throttle techniques for performance
Install / Use
/learn @behnammodi/TlenceREADME
tlence

debounce and throttle techniques for performance
install
npm install tlence
use
Throttle
import { throttle } from 'tlence';
function log(server) {
console.log('connecting to', server);
}
const throttleLog = throttle(log, 5000);
// just run first call to 5s
throttleLog('local');
throttleLog('local');
throttleLog('local');
throttleLog('local');
throttleLog('local');
throttleLog('local');
Debounce
import { debounce, delay } from 'tlence';
const debounceLog = debounce(log, 5000);
// just run last call to 5s
debounceLog('local');
debounceLog('local');
debounceLog('local');
debounceLog('local');
debounceLog('local');
debounceLog('local');
Delay
import { delay } from 'tlence';
console.log('delay 1');
await delay(5000);
// run after 5s
console.log('delay 2');
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR

