Skip to content

Commit

Permalink
Updated the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Dec 8, 2017
1 parent 4f5d605 commit c89370d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
This file contains highlights of what changes on each version of the [Akismet for JS](https://github.com/cedx/akismet.js) library.

## Version [13.0.1](https://github.com/cedx/akismet.js/compare/v13.0.0...v13.0.1)
- Fixed the previous packaging: `RequestEvent` class released by error.

## Version [13.0.0](https://github.com/cedx/akismet.js/compare/v12.0.0...v13.0.0)
- Breaking change: changed the signature of the `Client` events.
- Added the `RequestEvent` class.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ The `Client` class is an [`EventEmitter`](https://nodejs.org/api/events.html) th
You can subscribe to them using the `on()` method:

```javascript
client.on('request', event =>
console.log(`Client request: ${event.request.url}`)
client.on('request', (request) =>
console.log(`Client request: ${request.url}`)
);

client.on('response', event =>
console.log(`Server response: ${event.response.status}`)
client.on('response', (request, response) =>
console.log(`Server response: ${response.status}`)
);
```

Expand Down

0 comments on commit c89370d

Please sign in to comment.