@@ -6323,6 +6323,9 @@ R.normalize = s => s
63236323 . replaceAll ( / < n l \/ > / g, "\n" ) ;
63246324
63256325
6326+ R . concat = rx => ry => R ( rx . source + ry . source , rx . flag + ry . flags ) ;
6327+
6328+
63266329//█████ Common Patterns ███████████████████████████████████████████████████████
63276330
63286331
@@ -7179,28 +7182,22 @@ R.sliceTo = search => s => {
71797182/* Create a more general bound than `\b` by combining additional character
71807183classes like `[x-z]` or "\w" or even "ß" in a disjunctive manner. */
71817184
7182- R . bound = flags => ( ...classes ) => {
7183- const bound = "(?<=\\b |" + classes . join ( "|" ) + ")" ;
7185+ R . preBound = flags => ( ...classes ) => {
7186+ const bound = "(?<=^ |" + classes . join ( "|" ) + ")" ;
71847187 return R ( bound , flags ) ;
71857188} ;
71867189
71877190
7188- // prepend a bound on the left side of a regular expression
7189-
7190- R . prependBound = bound => rx =>
7191- R ( bound . source + rx . source , bound . flags + rx . flags ) ;
7192-
7193-
7194- // append a bound on the right side of a regular expression
7195-
7196- R . appendBound = bound => rx =>
7197- R ( rx . source + bound . source , bound . flags + rx . flags ) ;
7198-
7191+ R . sufBound = flags => ( ...classes ) => {
7192+ const bound = "(?=$|" + classes . join ( "|" ) + ")" ;
7193+ return R ( bound , flags ) ;
7194+ } ;
71997195
7200- // append/prepend a bound on both sides of a regular expression
72017196
7202- R . concatBound = bound => rx =>
7203- R ( bound . source + rx . source + bound . source , bound . flags + rx . flags ) ;
7197+ R . inBound = flags => ( ...classes ) => {
7198+ const bound = "(?:" + classes . join ( "|" ) + ")" ;
7199+ return R ( bound , flags ) ;
7200+ } ;
72047201
72057202
72067203//█████ Generalizing ██████████████████████████████████████████████████████████
0 commit comments