• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 14 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple cookie library for node (not bound to request)

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

More Repositories

1

proposal-from-import

AKA: make code completion work.
HTML
74
star
2

understudy

action interceptor for dynamic extensible systems
JavaScript
47
star
3

session-web-sockets

(connect with socket.io) session passing
JavaScript
31
star
4

node-overload

node.js addon that provides an Watchable class that has getters/setters without property names
C++
27
star
5

node-sfml

SFML Bindings for Node.js
C++
24
star
6

snapshot-utils

JavaScript
24
star
7

js-repl-goal

A source text goal intended to be used by JS for REPLs
23
star
8

node-policy

Policy management tool for Node.js
JavaScript
22
star
9

noda-loader

create single files to distribute your node applications easily
JavaScript
21
star
10

vscode-code-cover

JavaScript
17
star
11

node-module-system

Module system creation for secret purpose
JavaScript
16
star
12

generator-runner

its like a more generic task.js
JavaScript
14
star
13

proposal-debugger-operands

Adding an optional operand to the DebuggerStatement production of JS
HTML
13
star
14

top-level-await-talking

A place to record and hold conversation on top level await without character limits
12
star
15

dotignore

ignorefile/includefile matching .gitignore spec
JavaScript
9
star
16

callbackhell

utility for callback hell
JavaScript
9
star
17

babel-analysis

SSA/CFG for babylon
JavaScript
9
star
18

nam

Node Application Manager
JavaScript
9
star
19

using-node-workshop

JavaScript
8
star
20

tofu

TrustOnFirstUse toolkit
JavaScript
7
star
21

interposed

C level interposed library wrapper for node's ipc channel
C
7
star
22

local-fs-https-imports

JavaScript
6
star
23

esm-http-server

http-server with esm loader hooks
JavaScript
6
star
24

StaticAnalysis

Static Analysis Spec for JS
6
star
25

composable-ast-walker

JavaScript
5
star
26

Witch

node.js based web browser (terminal for now)
JavaScript
5
star
27

node-protocols

Place for the gathering of protocol implementations
JavaScript
5
star
28

auther

node.js service for logins and api tokens
JavaScript
5
star
29

node-jsonparser

chunked json parser in pure JS w/ saxlike interface
JavaScript
4
star
30

extract-cjs-static-bindings

JavaScript
4
star
31

es6-spread-rest

rest arguments, array spread, and argument spread compiled to ES5.
JavaScript
4
star
32

js-stdlib-expansion

An effort to collect APIs that should be investigated to make JS have a more commonly used feature complete standard library
JavaScript
4
star
33

I-D

Internet Drafts
Makefile
4
star
34

npm-github-service

Post Recieve Hook
JavaScript
4
star
35

proposal-arbitrary-module-namespace-identifiers

HTML
4
star
36

esir

ES IR
JavaScript
3
star
37

hellocoffee

3
star
38

clip

Express meets the CLI
JavaScript
3
star
39

debugging-node

presentation about testing and debugging node.js
JavaScript
3
star
40

atxjs-offline

Place for Austin Javascript Offline Application Example
JavaScript
3
star
41

flexbox_polyfill_js

a flexbox polyfill, written in JS. Go figure!
JavaScript
3
star
42

node-apm-loader-example

JavaScript
3
star
43

Simple-Bot

Simple configuration plugin based IRC bot.
JavaScript
3
star
44

noda-updater

noda spec for updating
JavaScript
3
star
45

interface

System for Complex interactions of interfaces without exposing private data to things outside of the system
JavaScript
3
star
46

node-ast-investigator

Tools for JS AST analysis
JavaScript
3
star
47

disable-codegen

Hooks to disable eval() and Function() in the current V8 context
C++
3
star
48

tictactoe-code-golf

tweet sized or smaller
HTML
3
star
49

node-process-queue

child process queues managed for interposition
JavaScript
2
star
50

resource-shim

resource shim for node environments without the resource loader apis
JavaScript
2
star
51

ConcurrentEditor

simple concurrent text editting
JavaScript
2
star
52

node-sw-compat-loader-test

Example of how to integrate/hook import in the browser and eventual example of userland loader compatibility between Node and web
JavaScript
2
star
53

WikiBit

JavaScript
2
star
54

json-schema

JSON Schema Website
2
star
55

cejs

cejs (pronounced Sieges) is a simple ejs compiler
2
star
56

winston-tee

C
2
star
57

sql.js

A simple in memory stub for SQL database interaction
2
star
58

node-jni

jni bindings for node, evented style
C++
2
star
59

canvas-clock

JavaScript
2
star
60

BotWeaver

JavaScript
2
star
61

heapdump-sample

setup a sampling interval for heap snapshots
JavaScript
2
star
62

esir-typesystem

JavaScript
2
star
63

Grain

Template Library Based Upon Ajax Blocks
JavaScript
2
star
64

package-imports-as-mock

for https://twitter.com/julian_duque/status/1493601817351143432
JavaScript
2
star
65

jscraft

JavaScript
2
star
66

Kitsune

JavaScript
2
star
67

node-nexmo

Moved
2
star
68

LRU

An LRU Cache and Buddies for Node
JavaScript
2
star
69

reconf

config file finder for nconf w/ defaults and overrides
JavaScript
2
star
70

jsentities

JavaScript
2
star
71

offline-image-editor

JavaScript
2
star
72

npm-script

run-script creator for npm emulating libraries
JavaScript
2
star
73

framework.design

expirements in framework design
JavaScript
2
star
74

streamedemitter

node.js event emitter that adds streams as input / output sources.
JavaScript
2
star
75

nexmo-api

JavaScript
1
star
76

flatter

windows node_modules flattener, beta
JavaScript
1
star
77

zomains

https://github.com/domenic/zones implemented using domains
JavaScript
1
star
78

Lovelace

Javascript Data and ISS Library
JavaScript
1
star
79

ssh-spawner

spawn() but for ssh
JavaScript
1
star
80

hiboo

Unofficial stripped down Haibu
JavaScript
1
star
81

devtools-livestream

JavaScript
1
star
82

node-tart

Lower level node-tar
JavaScript
1
star
83

_utility

An Extensible IRC Bot
JavaScript
1
star
84

uvcat

possibly the dumbest utility that can open a socket path and send it through curl.
C
1
star
85

flatiron-repl

remote repl plugin and client for flatiron apps
JavaScript
1
star
86

node-proposal-mime-api

A standard for creating a JS Object representing a MIME type
HTML
1
star