Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

374 B
Raw Blame
import { Environment } from "@hoppscotch/data"
import { stripClientLocalValuesForWire } from "~/helpers/clientLocalVariables"

export const environmentsExporter = (myEnvironments: Environment[]) => {
  const stripped = myEnvironments.map((env) => ({
    ...env,
    variables: stripClientLocalValuesForWire(env.variables),
  }))
  return JSON.stringify(stripped, null, 2)
}