# cookiemonster

> Client-side cookie handling

Latest version **1.1.0** (published 2016-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install cookiemonster
pnpm add cookiemonster
yarn add cookiemonster
bun add cookiemonster
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-01-01 |
| First published | 2015-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Christopher Brown |
| Maintainers | chbrown |
| Keywords | cookie, cookies, http, https, browser, client |

## Links

- npm: https://www.npmjs.com/package/cookiemonster
- Repository: https://github.com/chbrown/cookiemonster
- Issues: https://github.com/chbrown/cookiemonster/issues
- npm.io page: https://npm.io/package/cookiemonster

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-01-01
- 1.0.1 — 2015-07-31
- 1.0.0 — 2015-06-25

## README

# 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](http://chbrown.github.io/licenses/MIT/#2012-2015).

---
_Source: https://npm.io/package/cookiemonster · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
