Skip to content

manen/cookie-tray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookie Tray

A very simple and small (<0.5kb) library for serializing and deserializing cookies.

Usage

import cookie from 'cookie-tray';
// import { parse, stringify } also works

cookie.parse('cookies=fun; something=else'); // { cookies: 'fun', something: 'else' }
cookie.parse(document.cookie);

cookie.stringify({ cookies: 'fun', something: 'else' }); // cookies=fun; something=else

You can feed these values directly into the Cookie and Set-Cookie headers.

About

Tiny cookie parser and serializer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published