The property name to expand
The base IRI to use for local names
Optionalcontext: Record<string, string>Optional prefix mappings for expansion
The expanded property IRI
expandPropertyName("dc:title", "http://schema.org/", {
dc: "http://purl.org/dc/elements/1.1/"
}); // → "http://purl.org/dc/elements/1.1/title"
expandPropertyName("http://example.com/prop", "http://schema.org/", {});
// → "http://example.com/prop"
expandPropertyName("name", "http://schema.org/", {});
// → "http://schema.org/name"
Expands a property name to a full IRI
Handles three cases: