systemd-escape-pmb

(Un)Escape strings and paths for use as systemd unit name parts.

Usage no npm install needed!

<script type="module">
  import systemdEscapePmb from 'https://cdn.skypack.dev/systemd-escape-pmb';
</script>

README



systemd-escape-pmb

(Un)Escape strings and paths for use as systemd unit name parts.

API

This module exports an object that holds these functions:

escapeNonPath(s)

String → String. Escape a string exactly.

escapePath(s)

String → String. Normalize and then escape an absolute path.

unescapeNonPath(s)

String → String. Decode an escaped string.

unescapePath(s)

String → String. Decode an escaped path.

Known issues

  • Needs more/better tests and docs.

 

License

ISC