src/immutabilis.js
function createSub(value, computed) {
        if (isArray(value)) {
            return new List(value, computed);
        } else if (isObject(value)) {
            if (isImmutable(value)) {
                return value;
            } else if (value.constructor === Object) {
                return new Struct(value, computed);
            }
            return new Value(value, computed);
        }
        return new Value(value, computed);
    }
function createSub(value, computed) {
        if (isArray(value)) {
            return new List(value, computed);
        } else if (isObject(value)) {
            if (isImmutable(value)) {
                return value;
            } else if (value.constructor === Object) {
                return new Struct(value, computed);
            }
            return new Value(value, computed);
        }
        return new Value(value, computed);
    }
function createSub ( value , computed ) { if ( isArray ( value ) ) { return new List ( value , computed ) ; } else if ( isObject ( value ) ) { if ( isImmutable ( value ) ) { return value ; } else if ( value . constructor === Object ) { return new Struct ( value , computed ) ; } return new Value ( value , computed ) ; } return new Value ( value , computed ) ; }
Helper to create an immutable data object depending on the type of the input
@private
Helper to create an immutable data object depending on the type of the input