Coder Social home page Coder Social logo

node-cookiejar's Introduction

#CookieJar

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) turns input into a Cookie (singleton if given a Cookie)

#####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)
  • String path - base path to match (matches any path starting with this '/' is root)
  • 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) - 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) - add a cookie to the jar
  • Cookie[] setCookies(cookiestr_or_list) - add 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

node-cookiejar's People

Contributors

bmeck avatar clement avatar coreyjewett avatar cwholt avatar fjakobs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.