function command( repl ) {
	return onCommand;

	/**
	* Deletes user-defined documentation.
	*
	* @private
	* @param {Options} [options] - function options
	* @param {(RegExp|ArrayLikeObject)} [options.include] - name inclusion filter
	* @param {(RegExp|ArrayLikeObject)} [options.exclude] - name exclusion filter
	* @param {boolean} [options.filter='*'] - filter type (only applicable for array-like inclusion/exclusion filters)
	* @returns {void}
	*/
	function onCommand( options ) {
		var isArrInc;
		var isArrExc;
		var opts;
		var err;
		var len;

		if ( arguments.length ) {
			if ( !isPlainObject( options ) ) {
				err = new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
			opts = options;
		} else {
			opts = {};
		}
		if ( hasOwnProp( opts, 'include' ) ) {
			isArrInc = isArrayLike( opts.include );
			if ( isArrInc === false && !isRegExp( opts.include ) ) {
				err = new TypeError( format( 'invalid option. `%s` option must be a regular expression or an array-like object. Option: `%s`.', 'include', opts.include ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
		}
		if ( hasOwnProp( opts, 'exclude' ) ) {
			isArrExc = isArrayLike( opts.exclude );
			if ( isArrExc === false && !isRegExp( opts.exclude ) ) {
				err = new TypeError( format( 'invalid option. `%s` option must be a regular expression or an array-like object. Option: `%s`.', 'exclude', opts.include ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
		}
		if ( hasOwnProp( opts, 'filter' ) ) {
			if ( !contains( FILTERS, opts.filter ) ) {
				err = new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'filter', FILTERS.join( '", "' ), opts.filter ) );
				debug( 'Error: %s', err.message );
				repl._ostream.write( 'Error: '+err.message+'\n' );
				return;
			}
		} else {
			opts.filter = '*';
		}
		// Case: clear all user-defined documentation...
		if ( opts.include === void 0 && opts.exclude === void 0 ) {
			repl._userdocs.length = 0;
			log( repl, 'Cleared all user-defined documentation.' );
			debug( 'Cleared all user-defined documentation.' );
			return;
		}
		// Case: include/exclude filters:
		len = repl._userdocs.length / 3;
		filter( repl._userdocs, opts.filter, opts.include, isArrInc, opts.exclude, isArrExc ); // eslint-disable-line max-len
		len -= repl._userdocs.length / 3;
		log( repl, 'Cleared documentation for '+len+' alias(es).' );
		debug( 'Cleared documentation for %d alias(es).', len );
	}
}
Returns a callback to be invoked upon calling the `clearUserDocs` command.

@private
@param {REPL} repl - REPL instance
@returns {Function} callback