const arr = Array.from(str.matchAll(/[^\/]+/g), n => n[0]);
// или
const arr = str.match(/[^\/]+/g) ?? [];
// или
const arr = str.split('/').filter(Boolean);
// или
const arr = Array.prototype.reduce.call(str, (acc, n, i) => (
(n !== '/') && (
acc[1] !== i - 1 && acc[0].push(''),
acc[0][acc[0].length - 1] += n,
acc[1] = i
),
acc
), [ [], -Infinity ])[0];