koa-simple-ratelimit
Advanced tools
Comparing version 3.1.0 to 4.0.0
@@ -1,5 +0,1 @@ | ||
/** | ||
* Expose `ratelimit()` | ||
*/ | ||
export default ratelimit; | ||
export declare type RatelimitExpires = (expires: number) => string; | ||
@@ -64,2 +60,2 @@ export interface RatelimitOptions { | ||
*/ | ||
declare function ratelimit(options: RatelimitOptions): (ctx: any, next: any) => Promise<any>; | ||
export declare function ratelimit(options: RatelimitOptions): (ctx: any, next: any) => Promise<any>; |
@@ -31,7 +31,2 @@ "use strict"; | ||
/** | ||
* Expose `ratelimit()` | ||
*/ | ||
exports.default = ratelimit; | ||
module.exports = ratelimit; | ||
/** | ||
* Initialize ratelimit middleware with the given `opts` | ||
@@ -107,2 +102,3 @@ */ | ||
} | ||
exports.ratelimit = ratelimit; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "koa-simple-ratelimit", | ||
"version": "3.1.0", | ||
"version": "4.0.0", | ||
"description": "Simple Rate limiter middleware for koa v2", | ||
@@ -38,12 +38,12 @@ "repository": "scttcper/koa-simple-ratelimit", | ||
"@types/koa": "2.0.49", | ||
"@types/node": "12.7.3", | ||
"@types/node": "12.7.5", | ||
"@types/redis": "2.8.13", | ||
"@types/supertest": "2.0.8", | ||
"@typescript-eslint/eslint-plugin": "2.0.0", | ||
"@typescript-eslint/parser": "2.0.0", | ||
"eslint": "6.3.0", | ||
"@typescript-eslint/eslint-plugin": "2.3.0", | ||
"@typescript-eslint/parser": "2.3.0", | ||
"eslint": "6.4.0", | ||
"eslint-config-xo-space": "0.21.0", | ||
"eslint-config-xo-typescript": "0.17.0", | ||
"eslint-config-xo-typescript": "0.18.0", | ||
"eslint-plugin-import": "2.18.2", | ||
"ioredis": "^4.14.0", | ||
"ioredis": "^4.14.1", | ||
"jest": "24.9.0", | ||
@@ -55,4 +55,4 @@ "jest-junit": "8.0.0", | ||
"supertest": "4.0.2", | ||
"ts-jest": "24.0.2", | ||
"typescript": "3.6.2" | ||
"ts-jest": "24.1.0", | ||
"typescript": "3.6.3" | ||
}, | ||
@@ -59,0 +59,0 @@ "jest": { |
@@ -28,3 +28,3 @@ # koa-simple-ratelimit | ||
import ratelimit from './src'; | ||
import { ratelimit } from 'koa-simple-ratelimit'; | ||
@@ -31,0 +31,0 @@ const app = new Koa(); |
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
18297
161