1
0
mirror of https://github.com/vercel/commerce.git synced 2025-03-19 02:25:00 +00:00
2020-10-15 14:00:41 -05:00

6 lines
186 B
TypeScript

// Remove trailing and leading slash, usually included in nodes
// returned by the BigCommerce API
const getSlug = (path: string) => path.replace(/^\/|\/$/g, '')
export default getSlug