mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
12 lines
391 B
TypeScript
12 lines
391 B
TypeScript
import { Service } from '../client/interfaces/Service';
|
|
|
|
export function getServiceNames(services: Map<string, Service>): string[] {
|
|
return Array.from(services.values())
|
|
.map(service => service.name)
|
|
.sort((a, b) => {
|
|
const nameA = a.toLowerCase();
|
|
const nameB = b.toLowerCase();
|
|
return nameA.localeCompare(nameB, 'en');
|
|
});
|
|
}
|