import { includes } from "lodash" ; export function splitQNameByNamespace ( qName ) { if ( ! includes ( qName , ":" ) ) { return { prefix : undefined , localName : qName } ; } const match = qName . match ( /(?<ns>[^:]*)(:(?<name>.*))?/ ) ; const matchGroups = match ! . groups ! ; return { prefix : matchGroups . ns , localName : matchGroups . name , } ; }