ram64
Version:
Multi-threaded 64bit memory cache database inspired by redis-like features
13 lines (9 loc) • 332 B
text/typescript
import { CommandFn, CommandOptions } from '../../commands';
import { fn as get } from './get';
import { fn as set } from './set';
export const fn: CommandFn = (opts: CommandOptions): boolean => {
const value = get(opts);
if (value !== opts.args?.expectedValue) return false;
set(opts);
return true;
}