function convertButtonLabels()

in www/notification.js [133:149]


function convertButtonLabels (buttonLabels) {
    // Some platforms take an array of button label names.
    // Other platforms take a comma separated list.
    // For compatibility, we convert to the desired type based on the platform.
    if (platform.id === 'android' || platform.id === 'ios' || platform.id === 'windows') {
        if (typeof buttonLabels === 'string') {
            buttonLabels = buttonLabels.split(','); // not crazy about changing the var type here
        }
    } else {
        if (Array.isArray(buttonLabels)) {
            var buttonLabelArray = buttonLabels;
            buttonLabels = buttonLabelArray.toString();
        }
    }

    return buttonLabels;
}