ayiin 2.0.36 → 2.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,5 +2,5 @@ import { RequestHandler } from "express";
2
2
  import { RateLimiterOptions } from "../types";
3
3
  import Tools from "./tools";
4
4
  export declare class Limiter extends Tools {
5
- createRateLimit: (options: RateLimiterOptions) => Promise<RequestHandler>;
5
+ createRateLimit: (options: RateLimiterOptions) => RequestHandler;
6
6
  }
@@ -43,7 +43,7 @@ class MemoryStore {
43
43
  }
44
44
  // 🔹 Class Limiter
45
45
  class Limiter extends tools_1.default {
46
- createRateLimit = async (options) => {
46
+ createRateLimit = (options) => {
47
47
  const store = options.store ?? new MemoryStore(); // default ke MemoryStore
48
48
  return async (req, res, next) => {
49
49
  const now = Date.now();
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "ayiin",
3
- "version": "2.0.36",
3
+ "version": "2.0.38",
4
4
  "description": "Library Pribadi Yang Gak Ada Isinya",
5
5
  "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
6
7
  "bin": {
7
8
  "axd": "./dist/bin/cli.js"
8
9
  },