mirror of
https://github.com/vercel/commerce.git
synced 2025-07-05 04:31:22 +00:00
* folder and env setup * codegen.json headers removed * use-cart code flow updated * use-cart code flow updated * Implemented get-cart functionality * removed unused file * getAnonymousShopperToken function added * normalization mapping updated * PR points resolved * Anonymous shopper token query added * getAnonymousShopperToken function added * Anonymous shopper token query added Co-authored-by: Chandradeepta <43542673+Chandradeepta@users.noreply.github.com>
6 lines
186 B
TypeScript
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
|