mirror of
https://github.com/vercel/commerce.git
synced 2025-06-09 09:36:58 +00:00
6 lines
188 B
TypeScript
6 lines
188 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;
|