Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Utilities

getCookie

Takes in a cookie name and returns the value of the cookie.

Params

Signature: getCookie(cookieName)

cookieName : The name of the cookie to get

Returns

Returns the value of the cookie.

Examples

import { getCookie } from '@adobe-commerce/elsie/lib';
const result = getCookie('foo');
console.log(result); // "bar"