1.0.0 • Published 5 years ago

ciacho v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

ciacho.js npm version npm.io npm.io

A lightweight library for removing, adding and setting cookies in browser.

Install

# Install with npm...
$ npm install --save ciacho

# ...or you can use yarn
$ yarn add ciacho

Usage

// Import the whole package...
import Ciacho from 'ciacho';

// or modules.
import setCookie from 'ciacho/src/setCookie';
import getCookie from 'ciacho/src/getCookie';
import removeCookie from 'ciacho/src/removeCookie';

Methods

// Set cookie
Ciacho.set('name', 'value', {
	path: '/',
	expires: 2 * 24 * 60 * 60 * 1000, // 2 days
});

// Get cookie
Ciacho.get('name');

// Remove cookie
Ciacho.remove('name', '/path');

License

MIT © Przemysław Tyczyński

1.0.1

5 years ago

1.0.0

5 years ago