Support for regular expressions for paths in parameter configuration.
This commit is contained in:
1 parent
7695b606c6
commit
8c4240f024
8 files changed
+312
-123
No files matched your search
+3
-5
@@ -1,5 +1,5 @@
|
||||
config = require './config'
|
||||
common = require './common'
|
||||
parameters = require './parameters'
|
||||
|
||||
|
||||
stringToRegexp = (input) ->
|
||||
@@ -105,7 +105,5 @@ normalizers.mac = (input, normType) ->
|
||||
|
||||
|
||||
exports.normalize = (path, value, normType) ->
|
||||
if path of config.PARAMETERS and config.PARAMETERS[path].type?
|
||||
return normalizers[config.PARAMETERS[path].type](value, normType)
|
||||
else
|
||||
return normalizers['default'](value, normType)
|
||||
type = parameters.getType(path) ? 'default'
|
||||
normalizers[type](value, normType)
|
||||
Reference in new issue
Block a user