cooki3js v1.0.0
Cooki3JS
Cooki3JS is an npm package for making browser cookies easier to read, make, and use.
Usage
Getting Started
Okay so you wanna get started! So there are some easy steps to get started. First you should require the package;
const cookie = reqiure("Cooki3JS");
Then, you are free to use any of our variables! For example:
const cookie = reqiure("Cooki3JS");
cookie.set(name, value, expiration in (days));
cookie.set('username', 'Cooki3', 30)
This will make a cookie called 'username' that contains 'Cooki3' that expires in 30 days.
All Variables
cookie.set(name, value, days cookie will last);
: This is how you make a cookie.
cookie.read(name)
: This will show the cookie, not in string form.
cookie.string(name)
: This will show the cookie, in string form.
cookie.add(name, amount to add)
: This can add (amount) to a cookie if the cookie is a number a number.
cookie.sub(name, amount to subtract)
: This can subtract (amount) from a cookie if the cookie is a number.
cookie.mul(name, amount to multiply cookie by)
: This can multply a cookie if the cookie is a number.
cookie.div(name, amount to divide cookie by)
: This can divide a cookie if the cookie is a number.
5 years ago