lib/json-dry.js
function regenerateObject(root, holder, current, seen, retrieve, undry_paths, old, current_path) {

	var path,
	    temp,
	    key;

	for (key in current) {
		if (current.hasOwnProperty(key)) {
			// Only regenerate if it's not already seen
			if (!seen.get(current[key])) {
				path = current_path.slice(0);
				path.push(key);

				temp = regenerate(root, current, current[key], seen, retrieve, undry_paths, old, path);

				// @TODO: Values returned by `unDry` methods also get regenerated,
				// even though these could contain properties coming from somewhere else,
				// like live HTMLCollections. Assigning anything to that will throw an error.
				// This is a workaround to that proble: if the value is exactly the same,
				// it's not needed to assign it again, so it won't throw an error,
				// but it's not an ideal solution.
				if (temp !== current[key]) {
					current[key] = temp;
				}
			}
		}
	}

	return current;
}
function regenerateObject(root, holder, current, seen, retrieve, undry_paths, old, current_path) {

	var path,
	    temp,
	    key;

	for (key in current) {
		if (current.hasOwnProperty(key)) {
			// Only regenerate if it's not already seen
			if (!seen.get(current[key])) {
				path = current_path.slice(0);
				path.push(key);

				temp = regenerate(root, current, current[key], seen, retrieve, undry_paths, old, path);

				// @TODO: Values returned by `unDry` methods also get regenerated,
				// even though these could contain properties coming from somewhere else,
				// like live HTMLCollections. Assigning anything to that will throw an error.
				// This is a workaround to that proble: if the value is exactly the same,
				// it's not needed to assign it again, so it won't throw an error,
				// but it's not an ideal solution.
				if (temp !== current[key]) {
					current[key] = temp;
				}
			}
		}
	}

	return current;
}
function regenerateObject ( root , holder , current , seen , retrieve , undry_paths , old , current_path ) { var path , temp , key ; for ( key in current ) { if ( current . hasOwnProperty ( key ) ) { // Only regenerate if it's not already seen if ( ! seen . get ( current [ key ] ) ) { path = current_path . slice ( 0 ) ; path . push ( key ) ; temp = regenerate ( root , current , current [ key ] , seen , retrieve , undry_paths , old , path ) ; // @TODO: Values returned by `unDry` methods also get regenerated, // even though these could contain properties coming from somewhere else, // like live HTMLCollections. Assigning anything to that will throw an error. // This is a workaround to that proble: if the value is exactly the same, // it's not needed to assign it again, so it won't throw an error, // but it's not an ideal solution. if ( temp !== current [ key ] ) { current [ key ] = temp ; } } } } return current ; }
Regenerate an object

@author   Jelle De Loecker   <jelle@develry.be>
@since    0.1.4
@version  1.0.11

@return   {Object}
Regenerate an object