function command( repl ) {
	return onCommand;

	/**
	* Reloads a previously loaded module and all its associated module dependencies.
	*
	* @private
	* @param {string} id - module id or path
	* @returns {*} resolved module
	*/
	function onCommand( id ) {
		var nodes;
		var stack;
		var err;
		var m;
		var i;
		if ( !isString( id ) ) {
			err = new TypeError( format( 'invalid argument. Must provide a string. Value: `%s`.', id ) );
			debug( 'Error: %s', err.message );
			repl._ostream.write( 'Error: '+err.message+'\n' );
			return;
		}
		// Resolve the module id to a path:
		id = repl._context.require.resolve( id );

		// Attempt to load the module (if already loaded, this is effectively a no-op; if not already loaded, loading a module does *not* guarantee that all associated module dependencies will be freshly loaded; hence, cannot just simply `require` the module id):
		repl._context.require( id );

		// Get the module object:
		m = repl._context.require.cache[ id ];

		// Perform a depth-first search to get a list of all module ids which need to be re-imported...
		stack = new Stack();
		nodes = {};

		stack.push( m ); // push the root node onto the stack
		while ( stack.length ) {
			m = stack.pop();
			if ( m && !hasOwnProp( nodes, m.id ) ) {
				nodes[ m.id ] = true;
				for ( i = 0; i < m.children.length; i++ ) {
					stack.push( m.children[ i ] );
				}
			}
		}
		// Remove each module from the `require` cache...
		nodes = objectKeys( nodes );
		for ( i = 0; i < nodes.length; i++ ) {
			delete repl._context.require.cache[ nodes[ i ] ];
		}
		// Re-require the module (and all its associated dependencies):
		return repl._context.require( id );
	}
}
Returns a callback to be invoked upon calling the `deeprerequire` command.

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