1.0.1 • Published 3 years ago
zombie-cookie v1.0.1
Zombie cookie
A simple library for setting and reading your data to all storages in the browser at once.
Browser Support
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|---|
All ✔ | All ✔ | All ✔ | All ✔ | All ✔ | All ✔ |
Installing
Using npm:
$ npm install zombie-cookie
Using yarn:
$ yarn add zombie-cookie
Example
import zombieCookie from 'zombie-cookie'
// Set Zombie cookie
// First parameter: key
// Second parameter: Value
// Third parameter is optional: lifetime in seconds
zombieCookie.setZombieCookie('testKey', 'testValue', 100000)
// Get Zombie cookie
// Only one parameter: key
zombieCookie.getZombieCookie('testKey')