@kentcdodds/producthunt
src/get-topic.ts
13 lines · 481 B · TypeScriptimport { getTopic } from './domain.ts'
import type { ProductHuntGetTopicOptions } from './types.ts'
/**
* Look up a Product Hunt topic by id or slug.
* @example
* import getTopic from 'kody:@kentcdodds/producthunt/get-topic'
* const topic = await getTopic({ slug: 'developer-tools' })
* // => { id: '...', name: 'Developer Tools', postsCount: 12000 }
*/
export default async function getTopicEntrypoint(params: ProductHuntGetTopicOptions) {
return await getTopic(params)
}