Skip to content

Commit 4915b27

Browse files
author
do-web
committed
Merge branch 'release/1.1.0'
2 parents b648723 + 1ca7a48 commit 4915b27

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
## 1.1.0 - 2018-01-30
5+
6+
### Added
7+
- Changelog
8+
9+
### Changed
10+
- module.exports now returns only a function.
11+
Now you must create a new instance, it prevents from overwriting the default options.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $ npm install curl-request --save
2222
After installing the `npm` package you can now start simplifying requests like so:
2323

2424
```js
25-
const curl = require('curl-request');
25+
const curl = new (require( 'curl-request' ))();
2626
```
2727

2828
If you have problems installing the dependencies, use this to build it from source:
@@ -34,7 +34,7 @@ $ npm install node-libcurl --build-from-source
3434
## Usage
3535

3636
```js
37-
const curl = require( 'curl-request' );
37+
const curl = new (require( 'curl-request' ))();
3838

3939
curl.setHeaders([
4040
'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'
@@ -107,6 +107,7 @@ curl.newTorIdentity();
107107
curl.default.verbose = true;
108108
```
109109

110+
##
110111
## Contributing
111112

112113
1. Fork it

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const Curl = require('node-libcurl').Curl;
22
const Net = require('net');
33
const querystring = require('querystring');
44

5-
module.exports = (function () {
5+
module.exports = function () {
66

77
this['default'] = {
88
torControlHost: 'localhost',
@@ -174,4 +174,4 @@ module.exports = (function () {
174174
};
175175

176176
return this;
177-
})();
177+
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "curl-request",
3-
"version": "1.0.4",
3+
"version": "1.1.0",
44
"description": "cURL node wrapper with promises. Support http, https and proxies and more. All cURL options. Tor-Proxy support.",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)