summaryrefslogtreecommitdiff
path: root/app/data/randomdata.tsx
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
committerKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
commitf0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (patch)
tree575c0ff2cbb846252bd2e494c81c396846aab2f6 /app/data/randomdata.tsx
parent67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (diff)
Apply Prettier
Diffstat (limited to 'app/data/randomdata.tsx')
-rw-r--r--app/data/randomdata.tsx16
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)),
+ })),
+ }
}