Skip to content

An open source design system that's fully customizable and agent ready

TypeScript
249 B
Raw Blame
// Copyright (c) Meta Platforms, Inc. and affiliates.

export function sortTemplatesByTitle<T extends {name: string}>(
  templates: readonly T[],
): T[] {
  return [...templates].sort((left, right) =>
    left.name.localeCompare(right.name),
  );
}