Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/onesy-me/cookie

Cookie
https://github.com/onesy-me/cookie

amaui back-end backend browser cookie cookies front-end frontend javascript js typescript web

Last synced: 10 days ago
JSON representation

Cookie

Awesome Lists containing this project

README

        



onesy logo

onesy Cookie


Cookie



MIT license    
Production ready    
UMD 4.6kb gzipped    
100% test cov    
Browser


Very simple code    
Modern code    
Junior friendly    
Typescript    
Made with :yellow_heart:


## Getting started

### Add

```sh
yarn add @onesy/cookie
```

### Use

```javascript
import OnesyCookie from '@onesy/cookie';

const onesyCookie = new OnesyCookie();

// Add
onesyCookie.add('a', 4);

// Has
onesyCookie.has('a');

// true

// Get
onesyCookie.get('a');

// 4

// Remove
onesyCookie.remove('a');

onesyCookie.get('a');

// undefined
```

### Dev

Install

```sh
yarn
```

Test

```sh
yarn test
```

### Prod

Build

```sh
yarn build
```