How to remove interior faces while keeping exterior faces untouched?

So with your designBoxLabyrinth3D array that looks like you can create manually (appreciate that example), would I have to create another function to automatically convert an automatically made one or just modify my generator.create function(which I’m leaning toward)? For example https://jsfiddle.net/7y2nw834/3/ I use ROT.js library to create a random map every time:

var generator = new ROT.Map.Digger ( DUNGEON_WIDTH , DUNGEON_HEIGHT );

generator.create ( function ( x , y , v ) {

    if ( v === 1 ) {

        map[x][y] = Dungeon.Tile.floorTile;
        //console.log ( "    Floor Materials Added --> x: " + x + ", y: " + y + ", glyph: " + v );

    } else {

        map[x][y] = Dungeon.Tile.wallTile;
        //console.log ( "    Wall Materials Added --> x: " + x + ", y: " + y + ", glyph: " + v );

    }

} );