Repository navigation
Samual's Library 0.9
Added
parseBigInt()- likeparseInt()but for bigints@samual/lib/cookiemoduleencodeString()- for encoding any string to cookie safe stringdecodeString- for decoding a cookie safe string back to the original stringparseCookies()- for parsing a cookie string into aMapsetCookie()- for creating a cookie"Set-Cookie"header value that sets a cookiedeleteCookie()- for creating a"Set-Cookie"header value that deletes a cookieclearCookies()- returns multiple"Set-Cookie"header values that delete all cookies in theMapreturned byparseCookies()
@samual/lib/cookie/typedmodule - a type safe version of@samual/lib/cookiebuilt on ValibotmakeCookieOptions()- returns aCookieOptionsobject that is required by the following functionsgetCookie()- takes aCookieOptionsobject and returns a JSON parsed, type safe cookie valuesetCookie()- takes aCookieOptionsobject and a type safe value and returns a"Set-Cookie"header value that sets a cookiedeleteCookie()- takes aCookieOptionsobject and returns a"Set-Cookie"header value that deletes a cookie
tryThen()- abstraction aroundtrycatchdemonstrated in the cookie module