Skip to content

Commit 25c9f54

Browse files
committed
Updated README.
Fixed test.
1 parent d29e928 commit 25c9f54

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
##Curlup
2+
3+
Parses cURL command into a JavaScript object.
4+
5+
###Usage
6+
7+
```js
8+
import { parseCurl } from 'curlup';
9+
10+
const parsed = parseCurl('curl -o website https://domain.com');
11+
```

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ const parseCurl = curlCmd => {
153153
return result;
154154
};
155155

156-
export default {
156+
module.exports = {
157157
parseCurl
158158
};

index.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ const jsCurl = require('./index');
22

33
const pc = cmd => console.log(JSON.stringify(jsCurl.parseCurl(cmd), null, 2));
44

5-
test('adds 1 + 2 to equal 3', () => {
6-
expect(jsCurl.sum(1, 2)).toBe(3);
7-
});
8-
95
// https: //www.rosehosting.com/blog/curl-command-examples/
106
test('parseCurl', () => {
117
const cmd = `curl 'http://google.com/' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8,da;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Connection: keep-alive' --compressed`;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/imolorhe/js-curl"
88
},
99
"scripts": {
10-
"test": "./node_modules/.bin/jest --watch index.spec.js"
10+
"test": "./node_modules/.bin/jest index.spec.js"
1111
},
1212
"keywords": [
1313
"curl",

0 commit comments

Comments
 (0)