package.es.escape.mjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apidom-json-pointer Show documentation
Show all versions of apidom-json-pointer Show documentation
Evaluate JSON Pointer expressions against ApiDOM.
The newest version!
import { pipe, replace } from 'ramda';
// escape :: String -> String
const escape = pipe(replace(/~/g, '~0'), replace(/\//g, '~1'), encodeURIComponent);
export default escape;