@ketch-com/ketch-cookie
v1.0.24
Published
Ketch cookie
Downloads
579
Readme
ketch-cookie
Overview
The ketch-cookie library provides utility functions for dealing with cookies.
Set a Cookie
import { getCookie } from '@ketch-com/ketch-cookie'
const ttl = 100 // seconds
if (!setCookie(window, 'key', 'value', ttl)) {
console.log('could not set cookie')
}Sets a cookie.
Get a Cookie
import { getCookie } from '@ketch-com/ketch-cookie'
const value = getCookie(window, 'key')Gets the cookie value.
