Gathering detailed insights and metrics for timetrickle
Gathering detailed insights and metrics for timetrickle
Gathering detailed insights and metrics for timetrickle
Gathering detailed insights and metrics for timetrickle
npm install timetrickle
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
7 Stars
9 Commits
2 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Apr 02, 2017
Latest Version
0.1.2
Package Id
timetrickle@0.1.2
Size
2.02 kB
NPM Version
5.5.1
Node Version
8.8.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
If you're looking for a promise-based alternative to this module check out wyt.
Trickle limits function executions based on time. It lets you define the number of executions per a certain amount of milliseconds.
This is particularly useful to obey an API provider's rate limit, for example.
Note: trickle is called "timetrickle" on npm because someone has occupied the name before I had a chance.
1npm install timetrickle --save
or manually add it to your package.json
1var trickle = require('timetrickle'); 2 start = +Date.now(); 3 4// Helper function to show the time difference 5function since (time) { return Math.round((time - start) / 1000) + 's'; } 6 7// Limit once per second 8var limit = trickle(1, 1000); 9 10limit(function () { 11 console.log('I am doing an API call here', since(+Date.now())); 12}); 13 14limit(function () { 15 console.log('I am doing another API call here', since(+Date.now())); 16}); 17 18limit(function () { 19 console.log('I am doing an API call here again', since(+Date.now())); 20});
Will output:
I am doing an API call here 0s
I am doing an API call here again 1s
I am doing another API call here 2s
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More