export const getMachineNameSpaceReplacement = (platform) => (platform === 'drupal' ? '_' : '-');
export default function strToMachineName(str, platform) {
    return (str
        .replace(/[^A-Za-z0-9 ]/g, '')
        .replace(/\s{2,}/g, ' ')
        .replace(/\s/g, getMachineNameSpaceReplacement(platform))
        .toLowerCase());
}
