# electron-cookie-save

> Electron Cookie Store ; Easy Management Cookie in Electron

Latest version **1.0.2** (published 2019-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install electron-cookie-save
pnpm add electron-cookie-save
yarn add electron-cookie-save
bun add electron-cookie-save
```

## 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 | 2019-02-06 |
| First published | 2019-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Reza Ghasemzadeh |
| Maintainers | rezaghz |
| Keywords | cookies, cookie, electron, electron-cookie |

## Links

- npm: https://www.npmjs.com/package/electron-cookie-save
- Repository: https://github.com/rezaghz/electron-cookie-store
- Homepage: https://github.com/rezaghz/electron-cookie-store#readme
- Issues: https://github.com/rezaghz/electron-cookie-store/issues
- npm.io page: https://npm.io/package/electron-cookie-save

## Recent versions

- 1.0.2 (latest) — 2019-02-06
- 1.0.14 — 2019-02-06
- 1.0.13 — 2019-02-06
- 1.0.12 — 2019-02-06
- 1.0.10 — 2019-02-06
- 1.0.0 — 2019-02-06

## README

#Electron Cookie Save

NPM package For Easy Management Cookies in Electron.

##Installation
install by NPM
```bash
$ npm install electron-cookie-save --save
```
install by Yarn

```bash
$ yarn add electron-cookie-save
```
##How To Use ? 

### Set Cookie

```javascript
/**
* @param {string} url- The url to associate the cookie with.
* @param {string} {name = null} - name of the Cookie
* @param {string} {value = null} - value of name Cookie
* @param {number} {expirationDate} - Cookie expiration time of day
* @param {string} {domain=null} - The domain of the cookie. Empty by default if omitted.
* @param {string} {path=null} - The path of the cookie. Empty by default if omitted.
* @param  {boolean} {secure=null} - Whether the cookie should be marked as Secure. Defaults to false.
* @param  {boolean} {httpOnly=null} Whether the cookie should be marked as HTTP only. Defaults to false.
*/
const Cookie = require('electron-cookie-save');
Cookie.set("http://myUrl","cookieName","cookieValue",7);
```

### Get Cookie

```javascript
/**
* @param {string} url - The url to associate the cookie with.
* @param {string} {name=null} - name of the Cookie
* @param {boolean} {all = false} - get All Cookie of the Address
* @param {string} {domain=null} - The domain of the cookie. Empty by default if omitted.
* @param {string} {path=null} - The path of the cookie. Empty by default if omitted.
* @param  {boolean} {secure=null} - Whether the cookie should be marked as Secure. 
* @param  {boolean} {session =null} - Filters out session or persistent cookies. 
*/
const Cookie = require('electron-cookie-save');
Cookie.get("http://myUrl","cookieName").then(cookie=>{
    console.log(cookie);
}).catch(error=>{
    console.log(error);
});

```

### Get All Cookie 

```javascript
const Cookie = require('electron-cookie-save');
Cookie.all().then(cookies=>{
    console.log(cookies);
}).catch(errors=>{
    console.log(errors);
});
```

### Delete Cookie

```javascript
/**
* @param {string} url = The url to associate the cookie with.
* @param {string} name = name of the Cookie
*/
const Cookie = require('electron-cookie-save');
Cookie.delete("http://myUrl","cookieName");
```

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