Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kentcdodds/producthunt

src/get-user.ts

15 lines · 580 B · TypeScript
import { getUser } from './domain.ts'
import type { ProductHuntGetUserOptions } from './types.ts'

/**
 * Look up a Product Hunt hunter by id or username.
 * @param params.id - Hunter id.
 * @param params.username - Hunter username such as `kentcdodds`.
 * @example
 * import getUser from 'kody:@kentcdodds/producthunt/get-user'
 * const hunter = await getUser({ username: 'kentcdodds' })
 * // => { id: '...', username: 'kentcdodds', name: 'Kent C. Dodds' }
 */
export default async function getUserEntrypoint(params: ProductHuntGetUserOptions) {
	return await getUser(params)
}