@speechkit/speechkit-audio-player
Version:
A web player component that can play audio from https://speechkit.io
19 lines (14 loc) • 384 B
JavaScript
import Cookies from 'js-cookie'
import { get } from 'lodash'
const COOKIE_NAME = '_sk-data'
const getCookieData = () => {
return Cookies.getJSON(COOKIE_NAME)
}
export const getCookieValue = (key) => {
return get(getCookieData(), key)
}
export const setCookieValue = (key, value) => {
const data = getCookieData() || {}
data[key] = value
Cookies.set(COOKIE_NAME, data)
}