Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

request-rate-clock

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-rate-clock - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

8

CHANGELOG.md
# request-rate-clock
## 0.1.3
### Patch Changes
- de6ff1b: Update metadata
- Updated dependencies [de6ff1b]
- timeout-promise-wrapper@0.1.7
## 0.1.2

@@ -4,0 +12,0 @@

2

lib/rateclock.js

@@ -139,2 +139,2 @@ "use strict";

var _default = exports.default = RateClock;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdGltZW91dFByb21pc2VXcmFwcGVyIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsIlJhdGVDbG9jayIsImNyZWF0ZSIsImFtb3VudCIsInRpbWVvdXQiLCJFbnRpdHlSYXRlQ2xvY2siLCJleHBvcnRzIiwiRW50aXR5UmF0ZUNsb2NrRW50aXR5IiwicHJvbWlzZSIsIlByb21pc2UiLCJyZXNvbHZlIiwiY29uc3RydWN0b3IiLCJ1c2UiLCJ0aGVuIiwiZW50aXRpZXMiLCJ1bnVzZWQiLCJ3YWl0aW5nIiwidWlkIiwiQXJyYXkiLCJmcm9tIiwibGVuZ3RoIiwiTWF0aCIsInJhbmRvbSIsInRvU3RyaW5nIiwiam9pbiIsImkiLCJwdXNoIiwiZW50aXR5UmVhZHkiLCJlbnRpdHkiLCJzcGxpY2UiLCJlIiwiY29uc29sZSIsImxvZyIsImFjcXVpcmUiLCJjbG9jayIsInBvcCIsInJzIiwiX2RlZmF1bHQiXSwic291cmNlcyI6WyIuLi9zcmMvcmF0ZWNsb2NrLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0aW1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IsImlnbm9yZUxpc3QiOltdfQ==
{
"name": "request-rate-clock",
"version": "0.1.2",
"version": "0.1.3",
"description": "Rateclock provides a clock mechanism to work with api rate limits",

@@ -29,3 +29,3 @@ "main": "lib/index.js",

"dependencies": {
"timeout-promise-wrapper": "^0.1.6"
"timeout-promise-wrapper": "^0.1.7"
},

@@ -39,3 +39,4 @@ "scripts": {

"type-check": "tsc --noEmit",
"typedoc": "typedoc"
"typedoc": "typedoc",
"prepublish": "node ../../common/prepublish-script.mjs"
},

@@ -42,0 +43,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc