Skip to content

The open alternative to Salesforce, designed for AI.

216 B
Raw Blame
export const buildAlphabeticalRankByKey = (
  keys: string[],
): Map<string, number> => {
  const uniqueSortedKeys = [...new Set(keys)].sort();

  return new Map(uniqueSortedKeys.map((key, rank) => [key, rank]));
};