MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / debrack

Function debrack

lib/utils.mjs:50–61  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

48 * @return {string}
49 */
50export function debrack (s) {
51 if (!s || s.length < 2) {
52 return s
53 }
54 if (s[0] !== '<') {
55 return s
56 }
57 if (s[s.length - 1] !== '>') {
58 return s
59 }
60 return s.substring(1, s.length - 1)
61}
62
63/**
64 * Parse RDF content based on content type.

Callers 1

utils-test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected