MCPcopy Create free account
hub / github.com/dataease/SQLBot / escapePathComponent

Function escapePathComponent

frontend/public/swagger-ui-bundle.js:38448–38452  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

38446 }
38447 return !0
38448 }
38449 function escapePathComponent(s) {
38450 return -1 === s.indexOf('/') && -1 === s.indexOf('~')
38451 ? s
38452 : s.replace(/~/g, '~0').replace(/\//g, '~1')
38453 }
38454 function unescapePathComponent(s) {
38455 return s.replace(/~1/g, '/').replace(/~0/g, '~')

Callers 1

_generateFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected