From 62d60cce868a53a31c37b4a0f8128bd037f35331 Mon Sep 17 00:00:00 2001 From: Mindaugas Sharskus Date: Sun, 18 Nov 2018 09:42:29 +0000 Subject: [PATCH] Add color theme to code block & reformat Added color theme (JS) to the code block (was none before). Now it matches other code blocks. Code consistency. Reformated code style a bit to match previous code style. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d3d15c5d..c6c8fca2 100644 --- a/README.md +++ b/README.md @@ -113,11 +113,11 @@ If the supplied extractors don't meet your needs you can easily provide your own example, if you are using the cookie-parser middleware and want to extract the JWT in a cookie you could use the following function as the argument to the jwtFromRequest option: -``` +```js var cookieExtractor = function(req) { var token = null; - if (req && req.cookies) - { + + if (req && req.cookies){ token = req.cookies['jwt']; } return token;