UNPKG

@silverwind/ioredis-mock

Version:

This library emulates ioredis by performing all operations in-memory.

21 lines (17 loc) 416 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.del = del; var _keyspaceNotifications = require("../keyspace-notifications"); function del(...keys) { let deleted = 0; keys.forEach(key => { if (this.data.has(key)) { deleted++; (0, _keyspaceNotifications.emitNotification)(this, 'g', key, 'del'); } this.data.delete(key); }); return deleted; }