Skip to content

Commit

Permalink
[docs] Fix misnamed 'Object.keys' in API docs (#2979)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoden authored and darrachequesne committed Jun 19, 2017
1 parent bf7afb1 commit 7199d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ A hash of strings identifying the rooms this client is in, indexed by room name.
```js
io.on('connection', (socket) => {
socket.join('room 237', () => {
let rooms = Objects.keys(socket.rooms);
let rooms = Object.keys(socket.rooms);
console.log(rooms); // [ <socket.id>, 'room 237' ]
});
});
Expand Down Expand Up @@ -659,7 +659,7 @@ Adds the client to the `room`, and fires optionally a callback with `err` signat
```js
io.on('connection', (socket) => {
socket.join('room 237', () => {
let rooms = Objects.keys(socket.rooms);
let rooms = Object.keys(socket.rooms);
console.log(rooms); // [ <socket.id>, 'room 237' ]
io.to('room 237', 'a new user has joined the room'); // broadcast to everyone in the room
});
Expand Down

0 comments on commit 7199d1b

Please sign in to comment.