export const normalizeYesNoBooleans = (updateBody) => { updateBody = JSON.stringify(updateBody); updateBody = updateBody.replace(/:\"Yes\"/gm, `:true`); updateBody = updateBody.replace(/:\"No\"/gm, `:false`); updateBody = JSON.parse(updateBody); return updateBody; }; export const removeNullKeys = (updateBody) => { Object.keys(updateBody).forEach((key) => { if (updateBody[key] === null) { delete updateBody[key]; } }); return updateBody; }; export const stripInternalKeys = (updateBody) => { Object.keys(updateBody).forEach((key) => { if (key.indexOf("_") == 0) { delete updateBody[key]; } }); return updateBody; };