3
0
Fork 0
mirror of https://gitea.com/actions/setup-go.git synced 2024-11-26 11:39:31 +01:00
setup-go/node_modules/@actions/core/lib/utils.js
Thomas Boop 0caeaed6fd
Swap to Environment Files V1 Release (#77)
* Swap to Environment Files
2020-10-01 10:45:33 -04:00

19 lines
No EOL
620 B
JavaScript

"use strict";
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Sanitizes an input into a string so it can be passed into issueCommand safely
* @param input input to sanitize into a string
*/
function toCommandValue(input) {
if (input === null || input === undefined) {
return '';
}
else if (typeof input === 'string' || input instanceof String) {
return input;
}
return JSON.stringify(input);
}
exports.toCommandValue = toCommandValue;
//# sourceMappingURL=utils.js.map