1
0
Fork 0
mirror of https://github.com/dawidd6/action-ansible-playbook.git synced 2024-12-25 21:50:47 +00:00
action-ansible-playbook/node_modules/@actions/core/lib/utils.js

19 lines
620 B
JavaScript
Raw Normal View History

2020-11-12 15:41:30 +00:00
"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