Call Object.freeze(obj) recursively on all unfrozen
properties of obj that are functions or objects.

@param  {Object} [obj] Object to freeze
@return {Object}
182774
function deepFreeze(obj) {
        var _this = this;

        Object.freeze(obj);

        Object.getOwnPropertyNames(obj).forEach(function (prop) {
            if (obj.hasOwnProperty(prop) && obj[prop] !== null && (_typeof(obj[prop]) === 'object' || typeof obj[prop] === 'function') && !Object.isFrozen(obj[prop])) {
                _this.deepFreeze(obj[prop]);
            }
        });

        return obj;
    }
626295
function cleanObject(obj) {
  if (obj instanceof Object) {
    Object.keys(obj).forEach((key) => (obj[key] == null) && delete obj[key]);
  }
  return obj;
}
635808
function runNotCached (args, methodMeta) {
    // freeze args
    if (methodMeta.freeze) {
        // clone args to prevent leaking frozen objects
        args = _.cloneDeep(args)
        // recursively freeeze all objects in args
        deepFreeze(args)
    }
    // promise to be resolved with method result
    var promise
    // Immutable AI enabled
    if (methodMeta.immutableAI) {
        // create immutable ai instance
        var ai = immutableAI(args)
        // call method with Immutable AI instance
        promise = Promise.resolve( methodMeta.method.call(ai, args) )
    }
    // Immutable AI disabled
    else {
        promise = Promise.resolve( (methodMeta.method)(args) )
    }
    // args are frozen
    if (methodMeta.freeze) {
        // after result resolves clone to prevent leaking frozen objects
        promise = promise.then(_.cloneDeep)
    }
    // resolve promises
    if (methodMeta.resolve) {
        promise = promise.then(
            // if result is object then resolve promises
            ret => typeof ret === 'object' && ret !== null ? deepResolve(ret) : ret
        )
    }
    // validate return value
    if (defined(methodMeta.schema.return) && methodMeta.validateArgs) {
        promise = promise.then(ret => validateReturn(ret, methodMeta))
    }
    // return promise to be resolved with method result
    return promise
}
168781
function unflatten(obj) {
	var out = {};
	_.forEach(obj, function(v, k) {
		_.set(out, k, v);
	});
	return out;
}
569016
function clearObject (obj, defs, assigns) {
  if (obj) {
    var len
    var isDefs = arguments.length > 1 && (defs === null || !isObject(defs))
    var extds = isDefs ? assigns : defs
    if (isPlainObject(obj)) {
      objectEach(obj, isDefs ? function (val, key) {
        obj[key] = defs
      } : function (val, key) {
        deleteProperty(obj, key)
      })
      if (extds) {
        objectAssign(obj, extds)
      }
    } else if (isArray(obj)) {
      if (isDefs) {
        len = obj.length
        while (len > 0) {
          len--
          obj[len] = defs
        }
      } else {
        obj.length = 0
      }
      if (extds) {
        obj.push.apply(obj, extds)
      }
    }
  }
  return obj
}
428863
function clearOwnProperties(obj) {
  _.forOwn(obj, function (value, key) {
    delete obj[key];
  });

  return obj;
}
596732
function freezeOrganization(organization) {
    if (organization.propertyMap) {
        organization.propertyMap = Object.freeze(organization.propertyMap);
    }
    return domain.freeze(organization);
}
631102
def freeze_strings!
      # Recursive visitor pattern helper.
      visitor = lambda do |val|
        case val
        when Hash
          val.each_value { |v| visitor.call(v) }
        when Array
          val.each { |v| visitor.call(v) }
        when String
          val.freeze
        end
      end
      visitor.call(@data)
    end
484032
function objectToFunction(obj) {
  var fns = Object.keys(obj)
    .map(function (key) {
      return toBoolFunction(key, obj[key]);
    });
  return function(o){
    for (var i = 0; i < fns.length; i++) {
      if (!fns[i](o)) return false;
    }
    return true;
  }
}
220704
def freeze(obj):
    
    if isinstance(obj, collections.Mapping):
        return FrozenDict({freeze(k): freeze(v) for k, v in six.iteritems(obj)})
    elif isinstance(obj, list):
        return FrozenList([freeze(e) for e in obj])
    else:
        return obj
124688
function clean(obj) {
    for (var prop in obj) if (obj[prop] == null) delete obj[prop];
    return obj;
  }
401567
function(obj) {
        var pruned = {};
        _.each(obj, function(value, key) {
            if (!_.isUndefined(value) && !_.isNull(value)) {
                pruned[key] = value;
            }
        });

        return pruned;
    }
1161517
function deepFreeze(obj) {
            Object.freeze(obj);

            if (obj instanceof Array) {
                for (var i = 0; i < obj.length; i += 1) {
                    if (obj[i] !== null && typeof obj[i] === 'object') {
                        deepFreeze(obj[i]);
                    }
                }
            } else {
                for (var key in obj) {
                    if (obj[key] !== null && typeof obj[key] === 'object') {
                        deepFreeze(obj[key]);
                    }
                }
            }
        }
434282
function( obj ) {
					if ( obj == null ) {
						obj = promise;
					} else {
						for ( var key in promise ) {
							obj[ key ] = promise[ key ];
						}
					}
					return obj;
				}
1354098
def _freeze(self) -> OrderedDict:
        
        return OrderedDict(**{k: getattr(self, k, None) for k in super().__getattribute__("_columns")})
874263
public static function defrost( $frozenObject )
    {
        try
        {
            //	If the object isn't encoded/compressed, just take it as-is
            if ( false === ( $_object = @gzuncompress( @base64_decode( $frozenObject ) ) ) )
            {
                $_object = $frozenObject;
            }

            //	Is it frozen?
            if ( static::isFrozen( $_object ) )
            {
                return unserialize( $_object );
            }

            //	See if it's XML
            if ( false !== ( $_xml = @simplexml_load_string( $_object ) ) )
            {
                return $_xml;
            }
        }
        catch ( \Exception $_ex )
        {
            //	Nada
        }

        return $frozenObject;
    }
1048520
function(obj){
        if (obj == null || typeof(obj) !== 'object') return obj;
        var temp = new obj.constructor();
        for (var key in obj) temp[key] = arguments.callee(obj[key]);
        return temp;
      }