1.0.0-beta1 • Published 1 year ago

systemd-escape v1.0.0-beta1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Function to escape strings used with systemd.

Example

import {spawn} from "child_process";
import escape from "systemd-escape";

const instance = getInstanceNameSomehow();
const unit = `foo@${escape(instance)}`;
const child = spawn("systemctl", ["status", unit]);

child.stdout.pipe(process.stdout);