lp-simulation-environment/simulator/src/main/resources/static/lib/jsonform-defaults.js
Function setDefaultValues
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var setDefaultValues = function (obj, schema, includeOptionalValues, skipFieldsWithoutDefaultValue) {
if (!obj || !schema) return obj;
if (!schema.properties) {
schema = { properties: schema };
}
Function setObjKey
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var setObjKey = function (obj, key, value) {
var keyparts = key.split('.');
// Recursive version of setObjKey
var recSetObjKey = function (obj, keyparts, value) {
Function recSetObjKey
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var recSetObjKey = function (obj, keyparts, value) {
var arrayMatch = null;
var reArray = /\[([0-9]*)\]$/;
var subkey = keyparts.shift();
var idx = 0;
Function extractDefaultValues
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var extractDefaultValues = function (schemaItem, path) {
var properties = null;
var child = null;
if (!schemaItem || (schemaItem !== Object(schemaItem))) return null;