Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 | 2x | import {toStr} from "../helpers/string/to_string";
import {isEmpty} from "./is_empty";
export const split = (str, sep = undefined, limit = undefined, trim = true) => {
return toStr(str)
.split(sep, limit)
.map( el => trim ? el.trim() : el )
.filter( el => trim ? !isEmpty(el) : true)
} |