MCPcopy
hub / github.com/vpulim/node-soap / splitQName

Function splitQName

src/utils.ts:179–195  ·  view source on GitHub ↗
(nsName: T)

Source from the content-addressed store, hash-verified

177}
178
179export function splitQName<T>(nsName: T) {
180 if (typeof nsName !== 'string') {
181 return {
182 prefix: TNS_PREFIX,
183 name: nsName,
184 };
185 }
186
187 const [topLevelName] = nsName.split('|', 1);
188
189 const prefixOffset = topLevelName.indexOf(':');
190
191 return {
192 prefix: topLevelName.substring(0, prefixOffset) || TNS_PREFIX,
193 name: topLevelName.substring(prefixOffset + 1),
194 };
195}
196
197export function xmlEscape(obj) {
198 if (typeof obj === 'string') {

Callers 14

xmlToObjectMethod · 0.90
objectToXMLMethod · 0.90
findChildSchemaObjectMethod · 0.90
_parseMethod · 0.90
constructorMethod · 0.90
startElementMethod · 0.90
descriptionMethod · 0.90
descriptionMethod · 0.90
descriptionMethod · 0.90
postProcessMethod · 0.90
postProcessMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected