npm.io
1.0.1 • Published 7 years ago

@blanik/js-cookies

Licence
MIT
Version
1.0.1
Deps
7
Size
156 kB
Vulns
0
Weekly
0
Stars
1

meCookies

By Amadeusz Blanik

The only one pure JavaScript Cookies which use same time format as Jira!

How to use


Download one of following package:

Then…

<script src="mecookies.js"></script> 
<script> 
let meCookie = new MeCookies()
meCookie.set("hello", "world", "7d")
</script>

Devmode

let meCookie = new MeCookies(true)
Options

Set
meCookie.set(
    name, 
    value, 
    time, ~ eg. "1y 2m 7d 8h"
    path ~ default path = "/"
   )
Time
y - years
m - months
d - days
h - hours
Get
meCookie.get(name)

Keywords