BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / parse-cookie-phantomjs / readme.md

readme.md

Import template
timfa Tim · pushed by timfa · 4 years ago
c788ad20 History
readme.md 773 B Download Raw

parse-cookie-phantomjs Build Status

> Parse a cookie for use in PhantomJS

Accepts a cookie string and returns an object ready to be passed into phantom.addCookie().

Install

$ npm install --save parse-cookie-phantomjs

Usage

var parseCookiePhantomjs = require('parse-cookie-phantomjs');

parseCookiePhantomjs('foo=bar; Path=/; Domain=localhost');
/*
{
	name: 'foo',
	value: 'bar',
	domain: 'localhost',
	path: '/',
	httponly: false,
	secure: false,
	expires: 'Infinity'
}
*/

License

MIT © Sindre Sorhus

Source
1# parse-cookie-phantomjs [![Build Status](https://travis-ci.org/sindresorhus/parse-cookie-phantomjs.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-cookie-phantomjs)
2
3> Parse a cookie for use in PhantomJS
4
5Accepts a cookie string and returns an object ready to be passed into [`phantom.addCookie()`](http://phantomjs.org/api/phantom/method/add-cookie.html).
6
7
8## Install
9
10```sh
11$ npm install --save parse-cookie-phantomjs
12```
13
14
15## Usage
16
17```js
18var parseCookiePhantomjs = require('parse-cookie-phantomjs');
19
20parseCookiePhantomjs('foo=bar; Path=/; Domain=localhost');
21/*
22{
23 name: 'foo',
24 value: 'bar',
25 domain: 'localhost',
26 path: '/',
27 httponly: false,
28 secure: false,
29 expires: 'Infinity'
30}
31*/
32```
33
34
35## License
36
37MIT © [Sindre Sorhus](http://sindresorhus.com)