koo

Client-side cookies reader & writer

Usage no npm install needed!

<script type="module">
  import koo from 'https://cdn.skypack.dev/koo';
</script>

README

koo

Client-side cookies reader & writer

Install

npm install --save koo

API

koo.get([name])

Get cookies

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