{"repo":"jshttp/cookie","free":true,"listed":false,"github":"https://github.com/jshttp/cookie","clone":"git clone https://github.com/jshttp/cookie.git","description":"HTTP server cookie parsing and serialization","language":"TypeScript","stars":1531,"topics":["javascript","nodejs","http","cookie"],"license":"MIT","category":"dev-tools","readme_excerpt":"cookie [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coverage Status][coverage-image]][coverage-url] Basic HTTP cookie parser and serializer for HTTP servers. Installation API cookie.parseCookie(str, options) Parse an HTTP Cookie header string and return an object of all cookie name-value pairs. The str argument is the string representing a Cookie header value and options is an optional object containing additional parsing options. Options - decode Specifies the function to decode a cookie-value. Defaults to decodeURIComponent . cookie.stringifyCookie(cookieObj, options) Stringifies a cookie object into an HTTP Cookie header. Options - encode Specifies the function to encode a cookie-value. Defaults to encodeURIComponent . cookie.parseSetCookie(str, options) Parse an HTTP Set-Cookie header string and return an object of the options. Note: Cookie follows the specification and ignores invalid attributes, but does not attempt to normalize or modify any attributes as a browser might. For example: Options - decode Specifies the function to decode a cookie-value. Defaults to decodeURIComponent . cookie.stringifySetCookie(setCookieObj, options) Stringifies a Set-Cookie object into a Set-Cookie header string. Options - encode Specifies the function to encode a cookie-value. Defaults to encodeURIComponent . Cookie object The cookie object represents all cookie name-value pairs in a Cookie header, wh","default_branch":null,"files":null,"tree":[],"storefront":"/r/jshttp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jshttp/cookie/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}