Files
vault/ui/lib/core/addon/helpers/doc-link.js
claire bontempo 8d326c2351 ui: doc-link helper (#23689)
* doc-link helper

* add assertion
2023-10-17 09:35:20 -05:00

16 lines
407 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { helper } from '@ember/component/helper';
import { assert } from '@ember/debug';
export function docLink([path]) {
assert(`doc-link path: "${path}" must begin with a forward slash`, path.startsWith('/'));
const host = 'https://developer.hashicorp.com';
return `${host}${path}`;
}
export default helper(docLink);