From 309781965eb9fbc6e035bbe7a774f2a90f021c52 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Tue, 6 Dec 2016 16:14:27 +0100 Subject: optimized file size --- routes/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'routes') 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 -- cgit v1.1