grofers/redux-cookies-middleware

View on GitHub
src/cookieApi.js

Summary

Maintainability
A
0 mins
Test Coverage
import jsCookie from 'js-cookie';

const getCookie = name => jsCookie.get(name);

const setCookie = (name, value, expiry = 365, secure = false) => {
    jsCookie.set(name, value, { expires: expiry, path: '/', secure });
};

export { getCookie };
export default setCookie;