function factory() {
	var OPTIONS;
	var err;

	OPTIONS = defaults();
	if ( arguments.length ) {
		err = validate( OPTIONS, arguments[ 0 ] );
		if ( err ) {
			throw err;
		}
	}
	return array2fancy;

	/**
	* Converts an array to an object supporting fancy indexing.
	*
	* @private
	* @param {ArrayLike} x - input array
	* @param {Options} [options] - function options
	* @param {boolean} [options.strict] - boolean indicating whether to enforce strict bounds checking
	* @param {Function} [options.cache] - cache for resolving array index objects
	* @throws {TypeError} first argument must be array-like
	* @throws {TypeError} options argument must be an object
	* @throws {TypeError} must provide valid options
	* @returns {ArrayLike} fancy array
	*
	* @example
	* var x = [ 1, 2, 3, 4, 5, 6 ];
	*
	* var y = array2fancy( x );
	* // returns <Array>
	*
	* var z = y[ '1::2' ];
	* // returns [ 2, 4, 6 ]
	*
	* var len = z.length;
	* // returns 3
	*
	* var v = z[ 0 ];
	* // returns 2
	*
	* v = z[ 1 ];
	* // returns 4
	*
	* v = z[ 2 ];
	* // returns 6
	*/
	function array2fancy( x ) {
		var opts;
		var err;
		var arr;
		var dt;
		var o;
		if ( !isArrayLike( x ) && !isCollection( x ) ) {
			throw new TypeError( format( 'invalid argument. First argument must be array-like. Value: `%s`.', x ) );
		}
		if ( hasProxySupport ) {
			opts = assign( {}, OPTIONS );
			if ( arguments.length > 1 ) {
				err = validate( opts, arguments[ 1 ] );
				if ( err ) {
					throw err;
				}
			}
			arr = arraylike2object( x );
			dt = arr.dtype || '';
			o = {
				'ref': x,
				'dtype': dt,
				'getter': arr.accessors[ 0 ],
				'setter': arr.accessors[ 1 ],
				'preSetElement': setElementWrapper( dt ),
				'postGetArray': getArrayWrapper( array2fancy, opts ),
				'cache': opts.cache,
				'strict': opts.strict,
				'validator': validator( dt ),
				'array2fancy': array2fancy,
				'ctor': new Proxy( x.constructor || Array, {
					'construct': ctor( array2fancy, opts )
				})
			};
			return new Proxy( x, {
				'get': get( o ),
				'set': set( o )
			});
		}
		// TODO: replace with `@stdlib/console/warn` (or equivalent once available)
		console.warn( 'WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available.' ); // eslint-disable-line no-console
		return x;
	}
}
Returns a function for converting an array to an object supporting fancy indexing.

@param {Options} options - function options
@param {boolean} [options.strict=false] - boolean indicating whether to enforce strict bounds checking by default
@param {Function} [options.cache] - default cache for resolving array index objects
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@returns {Function} function for converting an array to an object supporting fancy indexing

@example
var array2fancy = factory();

var x = [ 1, 2, 3, 4, 5, 6 ];

var y = array2fancy( x );
// returns <Array>

var z = y[ '1::2' ];
// returns [ 2, 4, 6 ]

var len = z.length;
// returns 3

var v = z[ 0 ];
// returns 2

v = z[ 1 ];
// returns 4

v = z[ 2 ];
// returns 6