ram64
Version:
Multi-threaded 64bit memory cache database inspired by redis-like features
10 lines (7 loc) • 347 B
text/typescript
import { CommandFn, CommandOptions } from '../../commands';
import { fn as get } from './get';
export const fn: CommandFn = (opts: CommandOptions): Map<string,any>|undefined => {
const oldValue = get(opts);
const oldMap = oldValue instanceof Map ? oldValue : new Map();
return oldValue === undefined ? undefined : oldMap;
}