1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-02-23 02:52:23 +01:00

15 lines
332 B
TypeScript
Raw Normal View History

2021-08-29 18:57:23 +02:00
import authors from '../content/authors.json';
export type AuthorType = {
username: string;
name: string;
twitter: string;
picture: string;
bio: string;
}
export function findAuthorByUsername(username: string): AuthorType | undefined {
return (authors as AuthorType[]).find(author => author.username === username);
}