@cloud-copilot/iam-collect
Version:
Collect IAM information from AWS Accounts
13 lines • 375 B
JavaScript
/**
* Parse a JSON string if it is present, otherwise return undefined.
*
* @param value the JSON string to parse, or undefined if not present
* @returns the parsed JSON object, or undefined if value is undefined
*/
export function parseIfPresent(value) {
if (!value) {
return undefined;
}
return JSON.parse(value);
}
//# sourceMappingURL=json.js.map