diff --git a/index.ts b/index.ts index a55068c..757e572 100644 --- a/index.ts +++ b/index.ts @@ -8,6 +8,8 @@ import { stringQuadToQuad, stringToTerm, termToString, + escapeIRI, + escapeStringRDF, } from './lib/TermUtil'; export { getLiteralLanguage, @@ -19,4 +21,6 @@ export { stringQuadToQuad, stringToTerm, termToString, + escapeIRI, + escapeStringRDF, }; diff --git a/lib/TermUtil.ts b/lib/TermUtil.ts index eb28ac4..1770cb2 100644 --- a/lib/TermUtil.ts +++ b/lib/TermUtil.ts @@ -226,11 +226,11 @@ export function stringQuadToQuad( ); } -function escapeIRI(iriValue: string): string { +export function escapeIRI(iriValue: string): string { return iriValue.replace(escapePattern, replaceEscapedCharacter); } -function escapeStringRDF(stringValue: string): string { +export function escapeStringRDF(stringValue: string): string { if (escapePattern.test(stringValue)) { stringValue = stringValue.replace(escapePattern, replaceEscapedCharacter); }