UNPKG

ioredis-mock

Version:

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

13 lines (12 loc) 288 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hexists = hexists; function hexists(key, field) { var hash = this.data.get(key); if (!hash || hash[field] === undefined) { return 0; } return {}.hasOwnProperty.call(hash, field) ? 1 : 0; }