/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ export default function (string) { return string .replace(/[\t\r\n]/g, ' ') .replace(/ +/g, ' ') .replace(/^ /, '') .replace(/ $/, ''); }