CookieManager is a simple static ES6 component to deal with cookie that are accessible with javascript
Like every javascript component you just need to import it. Since it's a static component no instanciation is needed
import CookieManager from "./components/CookieManager.js";
- set : return
void
- Parameters : name
string
valuestring
maxAgeinteger
- Create a cookie with the specified name/value and the max age in minutes
- Parameters : name
- get : return
string
|null
- Parameters : name
string
- Get the value of a cookie by its name if it exists or it's accessible
- Parameters : name
- delete : return
void
- Parameters : name
string
- Delete a cookie by its name if it's accessible or if it exists
- Parameters : name
- getAll : return
object
- Paremeters :
- Get an object with all the cookies that are accessible
Kevin Goyvaerts