hapi-domainculture
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "hapi-domainculture", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Hapijs, domain culture plugin - this plugin will support the different markets and the language", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,7 +19,7 @@ [![Build | ||
com: { | ||
cultures: ['en-US', 'fr-CA'], // the first entry should be the default | ||
cultures: ['en-US', 'fr-CA'], | ||
default: 'en-US' | ||
}, | ||
commx: { | ||
cultures: ['es-MX', 'en-US'], // the first entry should be the default | ||
cultures: ['es-MX', 'en-US'], | ||
default: 'es-MX' | ||
@@ -26,0 +26,0 @@ } |
@@ -11,4 +11,8 @@ 'use strict'; | ||
const DEFAULT_DOMAIN_SETTINGS = options.white_list[options.default]; | ||
_.forEach(options.white_list, value => { | ||
_.pullAll(value.cultures, [value.default]); // mutate array, removing default | ||
value.cultures.unshift(value.default); // add default to front of array | ||
}); | ||
const DEFAULT_DOMAIN_SETTINGS = _.get(options, ['white_list', options.default]); | ||
if (!DEFAULT_DOMAIN_SETTINGS) { return next(new Error('The default for the white list is invalid')); } | ||
@@ -15,0 +19,0 @@ |
@@ -13,3 +13,3 @@ 'use strict'; | ||
com: { | ||
cultures: ['en-US', 'fr-CA'], | ||
cultures: ['en-AU', 'en-GB', 'en-IE', 'en-US', 'es-MX', 'fr-CA'], | ||
default: 'en-US' | ||
@@ -16,0 +16,0 @@ }, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37511
521
0