@yaebal/throttle 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaebal/throttle",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "yaebal throttle plugin — space out outgoing API calls to avoid 429s.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -16,7 +16,7 @@
16
16
  "src"
17
17
  ],
18
18
  "dependencies": {
19
- "@yaebal/core": "0.0.3"
19
+ "@yaebal/core": "0.0.5"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "latest"
package/src/index.test.ts CHANGED
@@ -28,7 +28,7 @@ test("throttle registers a before hook that resolves", async () => {
28
28
 
29
29
  throttle(api, { minIntervalMs: 0 });
30
30
  assert.equal(typeof hook, "function");
31
-
31
+
32
32
  await hook?.("sendMessage", undefined); // interval 0 → no delay
33
33
  });
34
34
 
package/src/index.ts CHANGED
@@ -37,7 +37,7 @@ function installThrottle(api: Api, options: ThrottleOptions = {}): void {
37
37
 
38
38
  const wait = slot.at - now;
39
39
  if (wait > 0) await new Promise((r) => setTimeout(r, wait));
40
-
40
+
41
41
  return undefined; // keep params unchanged
42
42
  });
43
43
  }