mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
15 lines
340 B
TypeScript
15 lines
340 B
TypeScript
import type { Category } from '@commerce/types/site'
|
|
import type { Category as CommercejsCategory } from '@chec/commerce.js/types/category'
|
|
|
|
export function normalizeCategory(
|
|
commercejsCatgeory: CommercejsCategory
|
|
): Category {
|
|
const { id, name, slug } = commercejsCatgeory
|
|
return {
|
|
id,
|
|
name,
|
|
slug,
|
|
path: slug,
|
|
}
|
|
}
|