MCPcopy Create free account
hub / github.com/Azure/powershell / toCommandValue

Function toCommandValue

lib/index.js:948–956  ·  view source on GitHub ↗

* Sanitizes an input into a string so it can be passed into issueCommand safely * @param input input to sanitize into a string

(input)

Source from the content-addressed store, hash-verified

946 * @param input input to sanitize into a string
947 */
948function toCommandValue(input) {
949 if (input === null || input === undefined) {
950 return '';
951 }
952 else if (typeof input === 'string' || input instanceof String) {
953 return input;
954 }
955 return JSON.stringify(input);
956}
957exports.toCommandValue = toCommandValue;
958/**
959 *

Callers

nothing calls this directly

Calls 1

stringifyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…