code: function freeze(object) {
  
  	/* retrieve the property names defined on object */
  	const propNames = Object.getOwnPropertyNames(object);
  
  	/* recursively freeze properties before freezing self */
  	for(const name of propNames) {
  		const value = object[name];
  		object[name] = value && typeof value === "object" ? freeze(value) : value;
  	}
  
  	/* return frozen object */
  	return Object.freeze(object);
  }
docs: /* object deep freeze function