I\'d like to split a string only the at the first n occurrences of a delimiter. I know, I could add them together using a loop, but isn\'t there a more straight forward appr
In my case this solves my problem:
const splitted = path.split('/') const core = splittedPath.slice(0, 2) const rest = splittedPath.slice(2).join('/') const result = [...core, rest]