Documentation
interleave

interleave

Interleaves so value in-between each element of the wrapped array.

import { arr } from "@tsly/arr";
 
const fruits = ["apple", "banana", "orange"];
 
arr(fruits)
    .interleave('|')
    .take(it => console.log(it));
 
// ["apple", "|", "banana", "|", "orange"]

Edit on CodeSandbox (opens in a new tab)