Support for regular expressions for paths in parameter configuration.

This commit is contained in:
Zaid Abdulla committed 2013-12-02 23:31:03 +03:00
1 parent 7695b606c6
commit 8c4240f024
8 files changed
+312 -123

No files matched your search

+3 -5
View File
@@ -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)