]> git.cworth.org Git - lmno-server/commitdiff
Use spread syntax rather than fill(nill) in generate_id
authorCarl Worth <cworth@cworth.org>
Wed, 10 Jun 2020 01:14:29 +0000 (18:14 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 10 Jun 2020 01:14:29 +0000 (18:14 -0700)
We don't actually need the array filled with null values specifically,
we just need something that map() will act on (since it doesn't act on
the empty entries we get from Array(4)). Using [...Array(4)] gives us
an array of undefined values which does the trick, and is a bit more
compact than .fill(null).

Of course, I blow away any savings in compactness with the giant
comment I've added here!


No differences found