Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

adding "export" to the beginning of every line in the block - javascript issue #46

Description

@Bubbalubagus

This library was tested on a few pages and on one page on one method is placed a bunch of the word "export" before each line like so:

// Fetch attractions
export export /**
export  * Performs a POST request to fetch attractions and Google Places recommendations based on the destination data provided in the request body. 
export  * If the request method is not POST, it sets the Allow header to POST and returns a 405 status code.
export  * @param {Object} req - The request object containing the destination data
export  * @param {Object} res - The response object to send back the attractions and recommendations
export  * @returns {Object} - An object containing shuffled array of attractions and Google Places recommendations
export  */
export async function POST(req, res) {
export   if (req.method === "POST") {
export     const { destination } = await req.json();
export     const viatorActivities = await fetchAttractions(destination.id);
export     const googlePlaces = await getGooglePlacesRecommendations(`${destination.name} ${destination.timeZone}`);
export 
export     return Response.json({ data: _.shuffle([...viatorActivities, ...googlePlaces]) });
export   } else {
export     res.setHeader("Allow", ["POST"]);
export     res.status(405).end(`Method ${req.method} Not Allowed`);
export   }
export }

This is how it looked prior:
`

// Fetch attractions
export async function POST(req, res) {
  if (req.method === "POST") {
    const { destination } = await req.json();
    const viatorActivities = await fetchAttractions(destination.id);
    const googlePlaces = await getGooglePlacesRecommendations(`${destination.name} ${destination.timeZone}`);

    return Response.json({ data: _.shuffle([...viatorActivities, ...googlePlaces]) });
  } else {
    res.setHeader("Allow", ["POST"]);
    res.status(405).end(`Method ${req.method} Not Allowed`);
  }
}

`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions