diff options
author | Kirill Rogovoy <[email protected]> | 2021-07-19 20:06:08 +0300 |
---|---|---|
committer | Kirill Rogovoy <[email protected]> | 2021-07-19 20:06:08 +0300 |
commit | f0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (patch) | |
tree | 575c0ff2cbb846252bd2e494c81c396846aab2f6 /app/data/randomdata.tsx | |
parent | 67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (diff) |
Apply Prettier
Diffstat (limited to 'app/data/randomdata.tsx')
-rw-r--r-- | app/data/randomdata.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/data/randomdata.tsx b/app/data/randomdata.tsx index f24a2ba..844f36f 100644 --- a/app/data/randomdata.tsx +++ b/app/data/randomdata.tsx @@ -1,11 +1,11 @@ export default function genRandomTree(N = 300, reverse = false) { return { - nodes: [...Array(N).keys()].map(i => ({ id: i })), - links: [...Array(N).keys()] - .filter(id => id) - .map(id => ({ - [reverse ? 'target' : 'source']: id, - [reverse ? 'source' : 'target']: Math.round(Math.random() * (id-1)) - })) - }; + nodes: [...Array(N).keys()].map((i) => ({ id: i })), + links: [...Array(N).keys()] + .filter((id) => id) + .map((id) => ({ + [reverse ? 'target' : 'source']: id, + [reverse ? 'source' : 'target']: Math.round(Math.random() * (id - 1)), + })), + } } |