UNPKG

captcha-canvas-js

Version:

A simple captcha generator using canvas in JavaScript

18 lines (17 loc) 442 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MemoryStore = void 0; class MemoryStore { store = new Map(); async set(id, value) { this.store.set(id, value); setTimeout(() => this.store.delete(id), 180_000); } async get(id) { return this.store.get(id) || null; } async delete(id) { this.store.delete(id); } } exports.MemoryStore = MemoryStore;