function copy( value, level ) {
	var out;
	if ( arguments.length > 1 ) {
		if ( !isNonNegativeInteger( level ) ) {
			throw new TypeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%s`.', level ) );
		}
		if ( level === 0 ) {
			return value;
		}
	} else {
		level = PINF;
	}
	out = ( isArray( value ) ) ? new Array( value.length ) : {};
	return deepCopy( value, out, [value], [out], level );
}
Copies or deep clones a value to an arbitrary depth.

@param {*} value - value to copy
@param {NonNegativeInteger} [level=+infinity] - copy depth
@throws {TypeError} second argument must be a nonnegative integer
@returns {*} value copy

@example
var out = copy( 'beep' );
// returns 'beep'

@example
var value = [
    {
        'a': 1,
        'b': true,
        'c': [ 1, 2, 3 ]
    }
];
var out = copy( value );
// returns [ { 'a': 1, 'b': true, 'c': [ 1, 2, 3 ] } ]

var bool = ( value[0].c === out[0].c );
// returns false