DRYed out the enableDeviceHelpers function by adding a deviceFactory class, setting the appropriate res.locals.type values
DRYed out the enableDeviceHelpers function by adding a deviceFactory class, setting the appropriate res.locals.type values

Smaller optimization according to jsHint,
Smaller RegEx optimization, added brackets in &| conditions, removed dot wildcard with a space character where practicable.

AngeloGulina/express-device,rguerreiro/express-device,lennym/express-device,rguerreiro/express-device,ryaneof/express-device