Commit bd5091d9 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent dfc1f032
...@@ -41,10 +41,10 @@ async function run() { ...@@ -41,10 +41,10 @@ async function run() {
for (let z=0;z<inline.sortByProfit.length;z++) for (let z=0;z<inline.sortByProfit.length;z++)
arr2.push(inline.sortByProfit[z]) arr2.push(inline.sortByProfit[z])
for (let z=0;z<inline.sortByPercentage.length;z++) // for (let z=0;z<inline.sortByPercentage.length;z++)
arrReserv.push(inline.sortByProfit[z]) // arrReserv.push(inline.sortByProfit[z])
for (let z=0;z<inline.sortByCompound.length;z++) // for (let z=0;z<inline.sortByCompound.length;z++)
arrCompound.push(inline.sortByProfit[z]) // arrCompound.push(inline.sortByProfit[z])
} }
...@@ -67,8 +67,8 @@ async function run() { ...@@ -67,8 +67,8 @@ async function run() {
let arr20Max = [] let arr20Max = []
let arr1000Compound = [] let arr1000Compound = []
arrReserv = _.orderBy(arrReserv, ['percentage'], ['asc']); arrReserv = _.orderBy(arr2, ['percentage'], ['asc']);
arrCompound = _.orderBy(arrCompound, ['compoundPerMonth'], ['desc']); arrCompound = _.orderBy(arr2, ['compoundPerMonth'], ['desc']);
let arrResrv200 = [] let arrResrv200 = []
let arrReservCompound = [] let arrReservCompound = []
for (let i = 0; i < 1000; i++) { for (let i = 0; i < 1000; i++) {
...@@ -124,21 +124,21 @@ async function readFile(name) ...@@ -124,21 +124,21 @@ async function readFile(name)
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++) {
//
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++) {
//
sortByCompound.push(file[j]) // sortByCompound.push(file[j])
} // }
return {sortByProfit:sortByProfit,sortByPercentage:sortByPercentage,sortByCompound:sortByCompound} return {sortByProfit:sortByProfit}
} }
function createfileADV(filename, data) { function createfileADV(filename, data) {
......
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