dist/hello.all.js
function(obj) {
		// Does not clone DOM elements, nor Binary data, e.g. Blobs, Filelists
		if (obj === null || typeof (obj) !== 'object' || obj instanceof Date || 'nodeName' in obj || this.isBinary(obj) || (typeof FormData === 'function' && obj instanceof FormData)) {
			return obj;
		}

		if (Array.isArray(obj)) {
			// Clone each item in the array
			return obj.map(this.clone.bind(this));
		}

		// But does clone everything else.
		var clone = {};
		for (var x in obj) {
			clone[x] = this.clone(obj[x]);
		}

		return clone;
	}
function(obj) {
		// Does not clone DOM elements, nor Binary data, e.g. Blobs, Filelists
		if (obj === null || typeof (obj) !== 'object' || obj instanceof Date || 'nodeName' in obj || this.isBinary(obj) || (typeof FormData === 'function' && obj instanceof FormData)) {
			return obj;
		}

		if (Array.isArray(obj)) {
			// Clone each item in the array
			return obj.map(this.clone.bind(this));
		}

		// But does clone everything else.
		var clone = {};
		for (var x in obj) {
			clone[x] = this.clone(obj[x]);
		}

		return clone;
	}
function ( obj ) { // Does not clone DOM elements, nor Binary data, e.g. Blobs, Filelists if ( obj === null || typeof ( obj ) !== 'object' || obj instanceof Date || 'nodeName' in obj || this . isBinary ( obj ) || ( typeof FormData === 'function' && obj instanceof FormData ) ) { return obj ; } if ( Array . isArray ( obj ) ) { // Clone each item in the array return obj . map ( this . clone . bind ( this ) ) ; } // But does clone everything else. var clone = { } ; for ( var x in obj ) { clone [ x ] = this . clone ( obj [ x ] ) ; } return clone ; }
Create a clone of an object
Create a clone of an object