sveltekit-rate-limiter
Advanced tools
Comparing version 0.1.6 to 0.1.7
import type { RequestEvent } from '@sveltejs/kit'; | ||
type RateHash = string; | ||
type RateUnit = 'ms' | 's' | 'm' | 'h' | 'd'; | ||
type RateUnit = 'ms' | 's' | 'm' | '15m' | '30m' | 'h' | 'd'; | ||
type Rate = [number, RateUnit]; | ||
@@ -5,0 +5,0 @@ interface RateLimiterStore { |
@@ -115,2 +115,6 @@ import crypto from 'crypto'; | ||
return 60 * 1000; | ||
if (unit == '15m') | ||
return 15 * 60 * 1000; | ||
if (unit == '30m') | ||
return 30 * 60 * 1000; | ||
if (unit == 'h') | ||
@@ -117,0 +121,0 @@ return 60 * 60 * 1000; |
{ | ||
"name": "sveltekit-rate-limiter", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"exports": { | ||
@@ -5,0 +5,0 @@ ".": { |
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
11380
230