1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/lib/commands/EXPIREAT.ts

12 lines
369 B
TypeScript

import { transformReplyBoolean } from './generic-transformers';
export function transformArguments(key: string, timestamp: number | Date): Array<string> {
return [
'EXPIREAT',
key,
(typeof timestamp === 'number' ? timestamp : Math.floor(timestamp.getTime() / 1000)).toString()
];
}
export const transformReply = transformReplyBoolean;