0.0.5 • Published 8 years ago
cookie-manage v0.0.5
Cookie Manager
How to use
Install
# npm install
npm install cookie-manager --saveImport
import {Cookie} from 'cookie-manager';Options
get(name: string): (string | null) {}- Get a single cookie by it's name
getAll(isObject: boolean = true): (Object | string) {}- Get all cookies
set(name, value, expires?, path?, domain?, secure?): boolean- date range: end date
name(string): Cookie's identification -value(string): Cookie's value -expires(number)number: limited or Infinitystring: string for expiresDate: Date object or null
-path(string): Path relative to the domain where the cookie should be avaiable. Default /
domain(string): Domain where the cookie should be avaiable. Default current domain -secure(boolean): If true, the cookie will only be available through a secured connection
remove(name: string, path?: string, domain?: string)- Remove a single cookie
removeAll(path?: string, domain?: string)- Remove all cookies