lib/index.js
function deletePath(obj, path) {
	var cur = obj;
	var parts = path.split('.');
	var i;
	for (i = 0; i < parts.length; i++) {
		if (i === parts.length - 1) {
			delete cur[parts[i]];
		} else {
			if (isScalar(cur[parts[i]])) {
				return obj;
			}
			cur = cur[parts[i]];
		}
	}
	return obj;
}
function deletePath(obj, path) {
	var cur = obj;
	var parts = path.split('.');
	var i;
	for (i = 0; i < parts.length; i++) {
		if (i === parts.length - 1) {
			delete cur[parts[i]];
		} else {
			if (isScalar(cur[parts[i]])) {
				return obj;
			}
			cur = cur[parts[i]];
		}
	}
	return obj;
}
function deletePath ( obj , path ) { var cur = obj ; var parts = path . split ( '.' ) ; var i ; for ( i = 0 ; i < parts . length ; i ++ ) { if ( i === parts . length - 1 ) { delete cur [ parts [ i ] ] ; } else { if ( isScalar ( cur [ parts [ i ] ] ) ) { return obj ; } cur = cur [ parts [ i ] ] ; } } return obj ; }
Deletes the value at a given path in an object.

@method deletePath
@static
@param {Object} obj
@param {String} path
@return {Object} - The object that was passed in
Deletes the value at a given path in an object .