/cookie

Cookie

Primary LanguageJavaScriptMIT LicenseMIT



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 💛


Getting started

Add

yarn add @onesy/cookie

Use

  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

yarn

Test

yarn test

Prod

Build

yarn build