Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 385 Bytes

File metadata and controls

18 lines (12 loc) · 385 Bytes

Cookie-utils

Utils for get, set and delete cookie files

How to

import { getCookie, setCookie, removeCookie } from '.';

// Create cookie with named test with value 1337 that will expire in 1 minute
setCookie('test', '1337', {
  expires: new Date(Date.now() + (1000 * 60)),
});

getCookie('test'); // returns '1337'

removeCookie('test'); // remove test cookie