Skip to content

Simple API to create, check and erase cookie in the browser

Notifications You must be signed in to change notification settings

poplingue/basic-cookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic-cookie

Tiny package to create, check and erase cookie in the browser. 🍪

Installation

yarn add @franca/basic-cookie

Available methods

getCookie

getCookie(name:String): <String || null>

setCookie

eraseCookie(name:String)

eraseCookie

setCookie(name: String, value: String, maxAge: number)

⚠️ If cookie already exists, it is erased before creation

Usage

import basicCookie from '@franca/basic-cookie';

basicCookie.setCookie('myCookie', 'isYummy', 2000);

Publish

$ yarn build
$ yarn lint
$ yarn format

$ yarn login
$ yarn publish

About

Simple API to create, check and erase cookie in the browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published