@djforth/cookie_mgmt_fp

Cookies manager

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Aug 21, 2017Jan 12, 2016Minified + gzip package size for @djforth/cookie_mgmt_fp in KB

Readme

Cookie Management

A small utility for managing cookies in the browser

Build Status

Install


npm install @djforth/cookie_mgmt_fp --save

Usage

Setup up and instance:

var CookieMgmt = require("@djforth/cookie_mgmt_fp");

var mycookie = CookieMgmt("my-cookie");

This will return a object with the following methods:

createCookie (Value, Days):

This will create the cookie "my-cookie" with a value of "foobar" and it will expire in 31 days

mycookie.createCookie("foobar", 31)

getValue

The cookie is read once the manage is instantiated, :

mycookie.getValue() //returns foobar

deleteCookie

This will delete the cookie:

mycookie.deleteCookie()

Bug reports

If you discover any bugs, feel free to create an issue on GitHub. Please add as much information as possible to help us fixing the possible bug. We also encourage you to help even more by forking and sending us a pull request.

https://github.com/djforth/cookie_mgmt_fp/issues

Contribute

If you'd like to contribute, cookie_mgmt_fp is written using babel in ES6.

Please make sure any additional code should be covered in tests (Jasmine using karma).

If you need to run the test please use:


npm test

or to rebuild the JS run:


npm run build

Maintainers

Adrian Stainforth (https://github.com/djforth)

License

cookie_mgmt_fp is an open source project falling under the MIT License. By using, distributing, or contributing to this project, you accept and agree that all code within the cookie_mgmt_fp project are licensed under MIT license.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.