handle-cookie

Parse string to cookie object

Usage no npm install needed!

<script type="module">
  import handleCookie from 'https://cdn.skypack.dev/handle-cookie';
</script>

README

Handle Cookie Build Status

Functions:

/**
 * @method cookieParse: Parse string to cookie objiect
 * @param str string | undefined
 * @param option CookieParseOptions | undefined
 * @returns { [key: string]: string } | undefined
 */
function cookieParse(str: string | undefined, option?: CookieParseOptions | undefined): { [key: string]: string } | undefined;
/**
 * @method cookieSerialize: Convert object to cookie string
 * @param name string
 * @param value string | undefined
 * @param option CookieSerializeOptions | undefined
 * @returns string | undefined
 */
function cookieSerialize(name: string | undefined, value: string | undefined, option?: CookieSerializeOptions | undefined): string | undefined;