common.js 187 Bytes
'use strict';

exports.removeSuffixFromNumber = function removeSuffixFromNumber(number, suffix) {
    const re = new RegExp((suffix || '@.*') + '$');
    return number.replace(re, '');
}