# etherio-cookie

> ## Installation

Latest version **1.0.2** (published 2020-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install etherio-cookie
pnpm add etherio-cookie
yarn add etherio-cookie
bun add etherio-cookie
```

## 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.0.2 |
| Published | 2020-10-23 |
| First published | 2020-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Etherio |
| Maintainers | etherio |
| Keywords | cookie |

## Links

- npm: https://www.npmjs.com/package/etherio-cookie
- Repository: https://github.com/etherio/node-cookie
- Homepage: https://github.com/etherio/node-cookie#readme
- Issues: https://github.com/etherio/node-cookie/issues
- npm.io page: https://npm.io/package/etherio-cookie

## Recent versions

- 1.0.2 (latest) — 2020-10-23
- 1.0.1 — 2020-10-23
- 1.0.0 — 2020-10-23

## README

# etherio-cookie

## Installation

```sh
    npm install etherio-cookie
```

## Usage

```js
//* importing module
const cookie = require('etherio-cookie');
```

## Parse Cookie From String

```js
var cookies = cookie.parse(request.headers.cookie);
```

_or_

```js
var cookies = cookie.parse('<cookie-name>=<cookie-value>;<more-cookie>=<more-value>');
```

## Create/Set Cookie

```js
// if u want to add setHeader(cookie) on response, add response variable in second argument
cookies.add({
    name: 'string:required',
    value: 'string:required',
    expires: new Date,
    secure: false,
    httponly: false,
    domain: '*',
    path: '/',
    samesite: 'Las'
}, response);
```

_or_

```js
cookie.create({
    name: 'string:required',
    value: 'string:required',
    expires: new Date,
    secure: false,
    httponly: false,
    domain: '*',
    path: '/',
    samesite: 'Las'
});
```

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