From 499bd4a5d47cb83c00f981208420864e7b2ab68e Mon Sep 17 00:00:00 2001 From: Mike Nicholson Date: Sat, 16 Mar 2019 19:20:55 -0400 Subject: [PATCH] Add js formatting to extractor example in README. See PR #171. The PR attempted to make style match but left out the space between the paren and the curly bracket. --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d3d15c5d..ba4385a8 100644 --- a/README.md +++ b/README.md @@ -113,11 +113,10 @@ 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;