Skip to content

Commit

Permalink
Modify version to 0.1.4 && Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ziczhu committed Aug 24, 2015
1 parent 5d648f4 commit 6317a84
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions HISTORY.md
@@ -1,3 +1,8 @@
0.1.4 / 2015-08-24
===================

* Support promise

0.1.2 / 2014-05-31
===================

Expand Down
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -80,6 +80,20 @@ co(function *() {
}
})();

/**
* use as a promise
*/

var promisePort = detect(port);

promisePort.then(function(_port) {
if (port === _port) {
console.log('port: %d was not occupied', port);
} else {
console.log('port: %d was occupied, try port: %d', port, _port);
}
});

```

## Clone and Run test
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "detect-port",
"version": "0.1.3",
"version": "0.1.4",
"description": "port detector",
"keywords": [
"detect",
Expand Down

0 comments on commit 6317a84

Please sign in to comment.