From cec4f4dcafad2bfbc6cfd097efd71536eab96f80 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 28 Jun 2021 23:33:05 +0200 Subject: [PATCH] p-throttle@4 --- package.json | 2 +- throttle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 53dc11fba..1e9fec7cd 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "luxon": "^1.3.0", "object-scan": "^13.0.0", "p-retry": "^4.1.0", - "p-throttle": "^3.1.0", + "p-throttle": "^4.1.1", "pinkie-promise": "^2.0.1", "qs": "^6.6.0", "slugg": "^1.2.0", diff --git a/throttle.js b/throttle.js index bf3557a19..ad1d2929d 100644 --- a/throttle.js +++ b/throttle.js @@ -9,7 +9,7 @@ const withThrottling = (profile, limit = 5, interval = 1000) => { return { ...profile, - request: throttle(request, limit, interval) + request: throttle({limit, interval})(request) } }