Skip to content

Commit 7199d1b

Browse files
ncodendarrachequesne
authored andcommitted
[docs] Fix misnamed 'Object.keys' in API docs (socketio#2979)
1 parent bf7afb1 commit 7199d1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/API.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ A hash of strings identifying the rooms this client is in, indexed by room name.
503503
```js
504504
io.on('connection', (socket) => {
505505
socket.join('room 237', () => {
506-
let rooms = Objects.keys(socket.rooms);
506+
let rooms = Object.keys(socket.rooms);
507507
console.log(rooms); // [ <socket.id>, 'room 237' ]
508508
});
509509
});
@@ -659,7 +659,7 @@ Adds the client to the `room`, and fires optionally a callback with `err` signat
659659
```js
660660
io.on('connection', (socket) => {
661661
socket.join('room 237', () => {
662-
let rooms = Objects.keys(socket.rooms);
662+
let rooms = Object.keys(socket.rooms);
663663
console.log(rooms); // [ <socket.id>, 'room 237' ]
664664
io.to('room 237', 'a new user has joined the room'); // broadcast to everyone in the room
665665
});

0 commit comments

Comments
 (0)