MCPcopy Create free account
hub / github.com/APIs-guru/aws2openapi / clean

Function clean

index.js:29–35  ·  view source on GitHub ↗

Removes starting and ending markup if no other 's exist @param s {string} the string to clean @returns the cleaned or original string

(s)

Source from the content-addressed store, hash-verified

27@returns the cleaned or original string
28*/
29function clean(s){
30 var org = s;
31 if (s && s.startsWith('<p>')) s = s.substr(3);
32 if (s && s.endsWith('</p>')) s = s.substr(0,s.length-4);
33 if (s && ((s.indexOf('<p>')>=0) || (s.indexOf('</p>')>=0))) return org;
34 return s;
35}
36
37/**
38Checks the source spec is in a format version and protocol we expect to see

Callers 3

transformShapeFunction · 0.85
attachParametersFunction · 0.85
index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected