From 7199d1b6ef812a13a4df09b5155b52f52517ea2d Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Mon, 19 Jun 2017 12:16:26 +0200 Subject: [PATCH] [docs] Fix misnamed 'Object.keys' in API docs (#2979) --- docs/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API.md b/docs/API.md index d357443e10..a3ebafa520 100644 --- a/docs/API.md +++ b/docs/API.md @@ -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); // [ , 'room 237' ] }); }); @@ -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); // [ , 'room 237' ] io.to('room 237', 'a new user has joined the room'); // broadcast to everyone in the room });