UNPKG

@alexaegis/advent-of-code-lib

Version:
9 lines (8 loc) 224 B
import { NEWLINE } from "./regex.js"; const split = (input, keepEmptyLines = false) => { const split2 = input.split(NEWLINE); return keepEmptyLines ? split2 : split2.filter((line) => !!line); }; export { split as s };