BlackJack 3df7502993 most working, work on front end | před 6 roky | |
---|---|---|
.. | ||
LICENSE | před 6 roky | |
cookiejar.js | před 6 roky | |
package.json | před 6 roky | |
readme.md | před 6 roky |
Simple robust cookie library
class to determine matching qualities of a cookie
It turns input into a Cookie (singleton if given a Cookie),
the request_domain
argument is used to default the domain if it is not explicit in the cookie string,
the request_path
argument is used to set the path if it is not explicit in a cookie String.
Explicit domains/paths will cascade, implied domains/paths must exactly match (see http://en.wikipedia.org/wiki/HTTP_cookie#Domain_and_Pat).
String toString()
- the set-cookie: string for this cookieString toValueString()
- the cookie: string for this cookieCookie parse(cookiestr, request_domain, request_path)
- parses the string onto this cookie or a new one if called directlyBoolean matches(access_info)
- returns true if the access_info allows retrieval of this cookieBoolean collidesWith(cookie)
- returns true if the cookies cannot exist in the same space (domain and path match)class to hold numerous cookies from multiple domains correctly
Cookie setCookie(cookie, request_domain, request_path)
- modify (or add if not already-existing) a cookie to the jarCookie[] setCookies(cookiestr_or_list, request_domain, request_path)
- modify (or add if not already-existing) a large number of cookies to the jarCookie getCookie(cookie_name,access_info)
- get a cookie with the name and access_info matchingCookie[] getCookies(access_info)
- grab all cookies matching this access_info