* Sanitizes an input into a string so it can be passed into issueCommand safely * @param input input to sanitize into a string
(input)
| 946 | * @param input input to sanitize into a string |
| 947 | */ |
| 948 | function 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 | } |
| 957 | exports.toCommandValue = toCommandValue; |
| 958 | /** |
| 959 | * |
nothing calls this directly
no test coverage detected
searching dependent graphs…