UNPKG
vremel
Version:
latest (0.6.2)
0.6.2
0.6.1
0.6.0
0.5.1
0.5.0
0.4.0
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.2
0.1.1
0.1.0
JavaScript date utility library for Temporal API
github.com/fabon-f/vremel
fabon-f/vremel
vremel
/
src
/
datetime
/
_unionRegExp.ts
10 lines
(8 loc)
•
224 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ escapeRegExp }
from
"./_escapeRegExp.js"
;
/**
@internal
*/
export
function
unionRegExp
(
strings
:
string
[]
):
string
{
return
strings .
map
(
(
str
) =>
escapeRegExp
(str)) .
filter
(
(
str
) =>
str !==
""
) .
join
(
"|"
); }