@mherod/get-cookie 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# get-cookie
|
|
2
|
+
|
|
3
|
+
## What is it?
|
|
4
|
+
|
|
5
|
+
get-cookie is a command line utility that allows you to get the value of a cookie from your locally installed browser. It is useful for testing web pages that require authentication.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
To install get-cookie, run the following command:
|
|
10
|
+
|
|
11
|
+
$ npm install @mherod/get-cookie --global
|
|
12
|
+
|
|
13
|
+
## How do I use it?
|
|
14
|
+
|
|
15
|
+
To use get-cookie, run the following command:
|
|
16
|
+
|
|
17
|
+
$ get-cookie <cookie-name> <domain>
|
|
18
|
+
|
|
19
|
+
For example, to get the value of the `auth` cookie on the `www.example.com` domain, run the following command:
|
|
20
|
+
|
|
21
|
+
$ get-cookie auth www.example.com
|
|
22
|
+
|
|
23
|
+
The output of the command will be the value of the cookie.
|
|
24
|
+
|
|
25
|
+
The library can also be used as a module.
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
const {getCookie} = require('@mherod/get-cookie');
|
|
29
|
+
getCookie('auth', 'www.example.com').then(console.log);
|
|
30
|
+
```
|
package/index.js
CHANGED