aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2016-12-06 16:14:27 +0100
committerNoah Loomans <noahloomans@gmail.com>2016-12-06 16:14:27 +0100
commit309781965eb9fbc6e035bbe7a774f2a90f021c52 (patch)
treeabe0c1de1075642a2bcdaf0e6b6a3b4d8923d8a7 /routes
parent54b9362d9548c8137d242fe5d30b3b0bbea72189 (diff)
optimized file size
Diffstat (limited to 'routes')
-rw-r--r--routes/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/index.js b/routes/index.js
index 8b31ad5..1ab2ba3 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -11,8 +11,9 @@ router.get('/', function (req, res, next) {
flags.push('NO_FEATURE_DETECT')
}
- const flagsStr = `var FLAGS = [${flags.map(flag => `"${flag}"`).toString(', ')}];`
- res.render('index', { flagsStr, users: users.users })
+ const flagsStr = `var FLAGS = ${JSON.stringify(flags)};`
+ const usersStr = `var USERS = ${JSON.stringify(users.users)};`
+ res.render('index', { flagsStr, usersStr })
})
module.exports = router