UNPKG

vremel

Version:

JavaScript date utility library for Temporal API

9 lines (7 loc) 207 B
import { escapeRegExp } from "./_escapeRegExp.js"; export function unionRegExp(strings: string[]): string { return strings .map((str) => escapeRegExp(str)) .filter((str) => str !== "") .join("|"); }