UNPKG

ram64

Version:

Multi-threaded 64bit memory cache database inspired by redis-like features

10 lines (7 loc) 340 B
import { CommandFn, CommandOptions } from '../../commands'; import { fn as get } from './get'; export const fn: CommandFn = (opts: CommandOptions): Set<any>|undefined => { const oldValue = get(opts); const oldSet = oldValue instanceof Set ? oldValue : new Set(); return oldValue === undefined ? undefined : oldSet; }