function command( repl ) {
	return onCommand;

	/**
	* Returns a boolean indicating whether a specified workspace exists.
	*
	* @private
	* @param {(string|RegExp)} name - workspace name or regular expression
	* @returns {(boolean|void)} boolean indicating whether a workspace exists
	*/
	function onCommand( name ) {
		var isStr;
		var keys;
		var err;
		var i;

		isStr = isString( name );
		if ( isStr === false && !isRegExp( name ) ) {
			err = new TypeError( format( 'invalid argument. Must provide either a string or regular expression. Value: `%s`.', name ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		if ( isStr ) {
			return hasOwnProp( repl._workspaces, name );
		}
		keys = objectKeys( repl._workspaces );
		for ( i = 0; i < keys.length; i++ ) {
			if ( name.test( keys[ i ] ) ) {
				return true;
			}
		}
		return false;
	}
}
Returns a callback to be invoked upon calling the `isWorkspace` command.

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