2.1.4 • Published 1 year ago

cookiejar v2.1.4

Weekly downloads
4,325,948
License
MIT
Repository
github
Last release
1 year ago

CookieJar

NPM version devDependency Status

Simple robust cookie library

Exports

CookieAccessInfo(domain,path,secure,script)

class to determine matching qualities of a cookie

Properties
  • String domain - domain to match
  • String path - path to match
  • Boolean secure - access is secure (ssl generally)
  • Boolean script - access is from a script

Cookie(cookiestr_or_cookie, request_domain, request_path)

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).

Properties
  • String name - name of the cookie
  • String value - string associated with the cookie
  • String domain - domain to match (on a cookie a '.' at the start means a wildcard matching anything ending in the rest)
  • Boolean explicit_domain - if the domain was explicitly set via the cookie string
  • String path - base path to match (matches any path starting with this '/' is root)
  • Boolean explicit_path - if the path was explicitly set via the cookie string
  • Boolean noscript - if it should be kept from scripts
  • Boolean secure - should it only be transmitted over secure means
  • Number expiration_date - number of millis since 1970 at which this should be removed
Methods
  • String toString() - the set-cookie: string for this cookie
  • String toValueString() - the cookie: string for this cookie
  • Cookie parse(cookiestr, request_domain, request_path) - parses the string onto this cookie or a new one if called directly
  • Boolean matches(access_info) - returns true if the access_info allows retrieval of this cookie
  • Boolean collidesWith(cookie) - returns true if the cookies cannot exist in the same space (domain and path match)

CookieJar()

class to hold numerous cookies from multiple domains correctly

Methods
  • Cookie setCookie(cookie, request_domain, request_path) - modify (or add if not already-existing) a cookie to the jar
  • Cookie[] setCookies(cookiestr_or_list, request_domain, request_path) - modify (or add if not already-existing) a large number of cookies to the jar
  • Cookie getCookie(cookie_name,access_info) - get a cookie with the name and access_info matching
  • Cookie[] getCookies(access_info) - grab all cookies matching this access_info
superagentsuperagent-connect-port@phil8795/pecuniarius-apisiege.jsxhr2-cookies-patchedcoolapk-proxy@infinitebrahmanuniverse/nolb-coo@everything-registry/sub-chunk-1379@or-change/http-agent@gasbuddy/swagger-client@hackmd/chai-httpenefti-galeri@influans/superagent@igniswap/igni-swap-lib@innoswap/core@eliteswap/v2-core@ffz/link-service@grantstrachan/npm-packaging-test@eternal-twin/hammerfest-client-http@eternal-twin/dinoparc-client-http@expressen/tallahasseeexpressception@jimpick/superagentsolutaautspeechtotextapiv30spider@kodinghandle/bullswap-libgassefals-2gassefals@ladjs/superagentstrong-swagger-clientsupertest-sessionsv-libgenesys-authentication-client-jsgenesys-statistics-client-jsgenesys-provisioning-client-js@litedexdev/litedex-core-swapswagger-ui-browserifyjavascript-clientkafirchain-tetris@miniu/alipaydevtaplytics-js@miniu/plugin-authtest-client@nodeberry/solidity-payment-processortixfactory.http@simtropolis/express-testimport-iotuTrabajo-clientui5-toolkit@quarks/superagenthw9totamveniam@novembrecom/zxcvbn@maniajs/xmlrpc@materia-dex/materia-contracts-proxy@mas.io/mas-cmp-cligenesys-workspace-client-jssuberagent@ljw1412/web-crawler-litegetletsuperagent-clone-for-webworkersuperagent-webpack-clientsuperagent-lssuperagent-moneysuperagent-vow@olympfin/olymp-swap-lib@omstickets/commontrans_zmtrans_zm111@sudophunk/fulido@tryghost/express-testnatanavra-chai-httpneo-xhrappc-swagger-client@yak-spirit/yak-swap-uiwsabi@taplytics/js-sdkmemcookies@thismr/bitmindtest-core@tix-factory/http@tix-factory/http-servicemedunham97123-superagentzpiderzona-xxhr2-cookiesxhr2-cookies-unsafexhr2-cookies-web3fixmarkdown-expressz-common-tools@volodgo/httploader@zalastax/nolb-coo@tonysusi/vapid@yonah-mozaic/jammber_mozaic_api@afria/afria-librariesbuster-fayecmdrkeene-fayepixiuswap-libs-sdkpixiu-swap-core@chakra-swap/core
2.1.4

1 year ago

2.1.3

3 years ago

2.1.2

6 years ago

2.1.1

7 years ago

2.1.0

8 years ago

2.0.6

8 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

13 years ago

1.2.0

13 years ago

1.1.1

13 years ago

1.1.0

13 years ago

1.0.5

13 years ago

1.0.3

13 years ago

1.0.0

13 years ago