cp-cookie
v1.0.1
Published
Simple client side cookie setter, getter, deleter.
Downloads
1
Readme
cp-cookie
Simple client side cookie setter, getter, deleter.
Install
npm install cp-cookie
Use
import cookie from 'cp-cookie';
or:
const cookie = require('cp-cookie');
Get
const email = cookie.get('email');
Set for life of session
cookie.set('email', '[email protected]');
Set with expiration (hours)
cookie.set('email', '[email protected]', 2);
Delete
cookie.delete('email');