Commit 725392fe authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent a74e53b6
...@@ -119,24 +119,21 @@ async function readFile(name) ...@@ -119,24 +119,21 @@ async function readFile(name)
file = JSON.parse(file) file = JSON.parse(file)
file = _.orderBy(file, sort, ['desc']); file = _.orderBy(file, sort, ['desc']);
for (let j = 0; j < file.length; j++) { for (let j = 0; j < file.length; j++) {
if (j>10)
break
sortByProfit.push(file[j]) sortByProfit.push(file[j])
} }
let sortByPercentage = [] let sortByPercentage = []
file = _.orderBy(file, ['percentage'], ['asc']); file = _.orderBy(file, ['percentage'], ['asc']);
for (let j = 0; j < file.length; j++) { for (let j = 0; j < file.length; j++) {
if (j>10)
break
sortByPercentage.push(file[j]) sortByPercentage.push(file[j])
} }
let sortByCompound = [] let sortByCompound = []
file =_.orderBy(file, ['compoundPerMonth'], ['desc']); file =_.orderBy(file, ['compoundPerMonth'], ['desc']);
for (let j = 0; j < file.length; j++) { for (let j = 0; j < file.length; j++) {
if (j>10)
break
sortByCompound.push(file[j]) sortByCompound.push(file[j])
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment