(eq, map, value, propertyName)
| 11764 | } |
| 11765 | |
| 11766 | function processUsing(eq, map, value, propertyName) { |
| 11767 | var typeName = value._$typeName || (value.parentEnum && value.parentEnum.name); |
| 11768 | var key = typeName && typeName.substr(0, 1).toLowerCase() + typeName.substr(1); |
| 11769 | if (propertyName && key != propertyName) { |
| 11770 | throw new Error("Invalid value for property: " + propertyName); |
| 11771 | } |
| 11772 | if (key) { |
| 11773 | var fn = map[key]; |
| 11774 | if (fn === undefined) { |
| 11775 | throw new Error("Invalid config property: " + key); |
| 11776 | } else if (fn === null) { |
| 11777 | eq[key] = value; |
| 11778 | } else { |
| 11779 | fn(eq, value); |
| 11780 | } |
| 11781 | } else { |
| 11782 | __objectForEach(value, function (propName, val) { |
| 11783 | processUsing(eq, map, val, propName) |
| 11784 | }); |
| 11785 | } |
| 11786 | } |
| 11787 | |
| 11788 | function normalizePropertyPaths(propertyPaths) { |
| 11789 | assertParam(propertyPaths, "propertyPaths").isOptional().isString().or().isArray().isString().check(); |
no test coverage detected