You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
17 lines
389 B
TypeScript
17 lines
389 B
TypeScript
import { transformReplyString } from './generic-transformers';
|
|
|
|
export interface AuthOptions {
|
|
username?: string;
|
|
password: string;
|
|
}
|
|
|
|
export function transformArguments({username, password}: AuthOptions): Array<string> {
|
|
if (!username) {
|
|
return ['AUTH', password];
|
|
}
|
|
|
|
return ['AUTH', username, password];
|
|
}
|
|
|
|
export const transformReply = transformReplyString;
|