function factory( path, options ) {
	var isStr;
	var props;
	var opts;
	var err;
	isStr = isString( path );
	if ( !isStr && !isArray( path ) ) {
		throw new TypeError( format( 'invalid argument. Key path must be a string or a key array. Value: `%s`.', path ) );
	}
	opts = defaults();
	if ( arguments.length > 1 ) {
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	if ( isStr ) {
		props = path.split( opts.sep );
	} else {
		props = path;
	}
	return deepGet;

	/**
	* Returns a nested property value.
	*
	* @private
	* @param {ObjectLike} obj - input object
	* @returns {*} nested property value
	*
	* @example
	* var obj = { 'a': { 'b': { 'c': 'd' } } };
	* var val = deepGet( obj );
	*/
	function deepGet( obj ) {
		if ( isObjectLike( obj ) ) {
			return dget( obj, props );
		}
	}
}
Returns a function for retrieving a nested property value.

@param {(string|Array)} path - key path
@param {Options} [options] - function options
@param {string} [options.sep='.'] - key path separator
@throws {TypeError} first argument must be a string or key array
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@returns {Function} deep get function

@example
var dget = factory( 'a/b/c', {
    'sep': '/'
});