Skip to main content
Version: Next

parseLocationRef()

Home > @backstage/catalog-model > parseLocationRef

Parses a string form location reference.

Signature:

function parseLocationRef(ref: string): {
type: string;
target: string;
};

Parameters

Parameter

Type

Description

ref

string

A string-form location ref, e.g. 'url:https://host'

**Returns:**

{ type: string; target: string; }

A location ref, e.g. { type: 'url', target: 'https://host' }