New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cookiemonster

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cookiemonster

Client-side cookie handling

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
11
120%
Maintainers
1
Weekly downloads
 
Created
Source

cookiemonster

Client-side cookie handling.

Use like:

import {CookieMonster} from 'cookiemonster';
var cookies = new CookieMonster(document);
var one_month_from_now = new Date(new Date().getTime() + 31*24*60*60*1000);
cookies.set('screen_name', 'chbrown', {path: '/', expires: one_month_from_now});
cookies.get('screen_name');

API

  • CookieMonster#get(name: string): string

    Get the string value of the cookie named name.

  • CookieMonster#set(name: string, value: string, options: CookieOptions): string

    Set the string value of the cookie named name with the given options.

  • CookieMonster#del(name: string, options: CookieOptions): string:

    Expire the cookie named name; set its value to the empty string and expires to the UNIX epoch.

License

Copyright 2012-2015 Christopher Brown. MIT Licensed.

Keywords

cookie

FAQs

Package last updated on 01 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts