# jscookie

> a tiny js cookie utility to get, set, and expire cookies

Latest version **1.1.0** (published 2016-04-13) · ISC license · 0 weekly downloads

## Install

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

## 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-04-13 |
| First published | 2016-04-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dave Devor |
| Maintainers | devor |
| Keywords | cookie, cookies, set cookie, js cookie, jscookie, js cookies |

## Links

- npm: https://www.npmjs.com/package/jscookie
- Repository: https://github.com/devor/jscookie
- Homepage: https://github.com/devor/jscookie#readme
- Issues: https://github.com/devor/jscookie/issues
- npm.io page: https://npm.io/package/jscookie

## Recent versions

- 1.1.0 (latest) — 2016-04-13
- 1.0.1 — 2016-04-13
- 1.0.0 — 2016-04-13

## README

# jscookie

A tiny js cookie utility to get, set, and expire cookies.


## How to use
### Install
* NPM: `npm install jscookie`

### Import the module
```javascript
var jscookie = require('jscookie');
```

### Set a cookie
```javascript
// Simple Session Cookie
jscookie.set({
	name   : 'the_cookie_name',
	value  : 'cookie value'
});
```

or

```javascript
// Advanced Options
jscookie.set({
	name   : 'the_cookie_name',
	value  : 'cookie value',
	exdays : 5; 
	path   : '/',
	domain : 'http://thisdomain.com'
});
```
Setting a cookie exdays to `false`, or ommitting the property, will create a session only cookie..

### Get a cookie value
```javascript
jscookie.get('the_cookie_name');
```

### Expire a cookie value
```javascript
jscookie.del('the_cookie_name');
```

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