From 0d0651f8ac3b77d84112452c0bdc9541e7f56c91 Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Thu, 17 Mar 2016 09:05:32 +0200 Subject: [PATCH] Get rid of ugly for-loops using lodash --- middleware/localNamingConventions.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/middleware/localNamingConventions.js b/middleware/localNamingConventions.js index ec416790..dd026bb3 100644 --- a/middleware/localNamingConventions.js +++ b/middleware/localNamingConventions.js @@ -1,4 +1,5 @@ var check = require('check-types'); +var _ = require('lodash'); var flipNumberAndStreetCountries = ['DEU', 'FIN', 'SWE', 'NOR', 'DNK', 'ISL']; @@ -7,12 +8,7 @@ function setup() { var settings = api.localization; if (settings && settings.flipNumberAndStreetCountries) { var countries = settings.flipNumberAndStreetCountries; - for (var i=0; i