JS Split à l'index

const splitAt = (index: number) => (x: string) => [x.slice(0, index), x.slice(index)]
florinrelea