index.d.ts 397 B

12345678910
  1. declare module 'cluster-key-slot' {
  2. // Convert a string or Buffer into a redis slot hash.
  3. function calculate(value: string | Buffer): number;
  4. // Convert an array of multiple strings or Buffers into a redis slot hash.
  5. // Returns -1 if one of the keys is not for the same slot as the others
  6. export function generateMulti(values: Array<string | Buffer>): number;
  7. export = calculate;
  8. }