Skip to content

Commit

Permalink
[fix]: unfold union in WithPadding > arbitrary.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-alford committed May 5, 2023
1 parent 4bfaf50 commit 71bc279
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schemables/WithPadding/instances/arbitrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const Arbitrary: WithPadding1<Arb.URI> = {
flow(
stripLeftWhile(c => c === char),
s =>
s.length > length
s.length > foldUnion(length)(s)
? s.slice(0, foldUnion(length)(s))
: s.padStart(foldUnion(length)(s), char),
),
Expand All @@ -51,7 +51,7 @@ export const Arbitrary: WithPadding1<Arb.URI> = {
flow(
stripRightWhile(c => c === char),
s =>
s.length > length
s.length > foldUnion(length)(s)
? s.slice(0, foldUnion(length)(s))
: s.padEnd(foldUnion(length)(s), char),
),
Expand Down

0 comments on commit 71bc279

Please sign in to comment.