Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andrepolischuk/koo

Client-side cookies reader & writer
https://github.com/andrepolischuk/koo

cookie

Last synced: 5 days ago
JSON representation

Client-side cookies reader & writer

Awesome Lists containing this project

README

        

# koo

> Client-side cookies reader & writer

## Install

```sh
npm install --save koo
```

## API

### koo.get([name])

Get cookies

```js
koo.get(); // {hello: 'world'}
koo.get('hello'); // 'world'
```

### koo.set(name, value[, options])

Set cookie with `options` object:

* `expires`
* `path`
* `domain`
* `samesite`
* `secure`

### koo.remove(name[, options])

Remove cookie

## License

MIT