request-rate-clock
Advanced tools
Comparing version 0.1.4 to 0.1.5
# request-rate-clock | ||
## 0.1.5 | ||
### Patch Changes | ||
- b42ab97: Update dependencies | ||
- Updated dependencies [b42ab97] | ||
- timeout-promise-wrapper@0.1.9 | ||
## 0.1.4 | ||
@@ -4,0 +12,0 @@ |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _timeoutPromiseWrapper = _interopRequireDefault(require("timeout-promise-wrapper")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
/** | ||
@@ -140,2 +140,2 @@ * A RateClock is a class that allows you to limit the rate of a certain operation. | ||
var _default = exports.default = RateClock; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdGltZW91dFByb21pc2VXcmFwcGVyIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsIlJhdGVDbG9jayIsImNyZWF0ZSIsImFtb3VudCIsInRpbWVvdXQiLCJFbnRpdHlSYXRlQ2xvY2siLCJleHBvcnRzIiwiRW50aXR5UmF0ZUNsb2NrRW50aXR5IiwicHJvbWlzZSIsIlByb21pc2UiLCJyZXNvbHZlIiwiY29uc3RydWN0b3IiLCJ1c2UiLCJ0aGVuIiwiZW50aXRpZXMiLCJ1bnVzZWQiLCJ3YWl0aW5nIiwidWlkIiwiQXJyYXkiLCJmcm9tIiwibGVuZ3RoIiwiTWF0aCIsInJhbmRvbSIsInRvU3RyaW5nIiwiam9pbiIsImkiLCJwdXNoIiwiZW50aXR5UmVhZHkiLCJlbnRpdHkiLCJzcGxpY2UiLCJlIiwiY29uc29sZSIsImxvZyIsImFjcXVpcmUiLCJjbG9jayIsInBvcCIsInJzIiwiX2RlZmF1bHQiXSwic291cmNlcyI6WyIuLi9zcmMvcmF0ZWNs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jQyxTQUFTIiwiaWdub3JlTGlzdCI6W119 |
{ | ||
"name": "request-rate-clock", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Rateclock provides a clock mechanism to work with api rate limits", | ||
@@ -9,23 +9,23 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@babel/cli": "^7.23.4", | ||
"@babel/core": "^7.23.3", | ||
"@babel/cli": "^7.25.9", | ||
"@babel/core": "^7.26.0", | ||
"@babel/plugin-proposal-class-properties": "^7.18.6", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.20.7", | ||
"@babel/preset-env": "^7.23.7", | ||
"@babel/preset-typescript": "^7.24.1", | ||
"@babel/preset-env": "^7.26.0", | ||
"@babel/preset-typescript": "^7.25.7", | ||
"@types/debug": "^4.1.12", | ||
"@types/jest": "^29.5.11", | ||
"@types/node": "^20.12.2", | ||
"@typescript-eslint/eslint-plugin": "^7.4.0", | ||
"@typescript-eslint/parser": "^7.4.0", | ||
"@types/jest": "^29.5.13", | ||
"@types/node": "^22.8.1", | ||
"@typescript-eslint/eslint-plugin": "^7.16.1", | ||
"@typescript-eslint/parser": "^7.18.0", | ||
"babel-jest": "^29.7.0", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-jest": "^27.6.0", | ||
"eslint": "^8.57.1", | ||
"eslint-plugin-jest": "^28.8.3", | ||
"jest": "^29.7.0", | ||
"source-map-support": "^0.5.21", | ||
"typedoc": "^0.25.4", | ||
"typescript": "^5.3.3" | ||
"typedoc": "^0.26.11", | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"timeout-promise-wrapper": "^0.1.8" | ||
"timeout-promise-wrapper": "^0.1.9" | ||
}, | ||
@@ -32,0 +32,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23355