validator.js 278 Bytes
function isSeparator(char) {
    return char.search(/[\n., ;]/) === 0;
}

function isSeparatorHead(char) {
    return char.search(/-/) === 0 || isSeparator(char)
}

module.exports = (head, tail) => {
    return isSeparatorHead(head[head.length - 1]) || isSeparator(tail[0]);
};