2022-01-14 13:33:59 -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