MCPcopy Create free account
hub / github.com/arfct/itty-bitty / decodePrettyComponent

Function decodePrettyComponent

docs/bitty.js:542–545  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

540}
541
542function decodePrettyComponent(s) {
543 let replacements = {'---': ' - ', '--': '-','-' : ' '}
544 return decodeURIComponent(s.replace(/-+/g, e => replacements[e] ?? '-'))
545}
546
547function pathToMetadata(path) {
548 let components = path.substring(1).split("/");

Callers 2

parseBittyURLFunction · 0.70
pathToMetadataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected