Commit 50a51a11 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 93e20274
...@@ -73,6 +73,7 @@ async function init() { ...@@ -73,6 +73,7 @@ async function init() {
arr.push(f) arr.push(f)
} }
arr = _.uniqBy(arr, 'name'); arr = _.uniqBy(arr, 'name');
createfinalADV(JSON.stringify(arr, null, 2))
// console.log(arr) // console.log(arr)
...@@ -125,6 +126,16 @@ function createComResfileADV(data) { ...@@ -125,6 +126,16 @@ function createComResfileADV(data) {
}); });
} }
function createfinalADV(data) {
// console.log(data)
return new Promise(function (resolve, reject) {
fs.writeFile(pairs + 'final.json', data, 'utf8', function (err) {
if (err) reject(err);
else resolve(data);
});
});
}
function found(indicator,pair, lp) { function found(indicator,pair, lp) {
// console.log(indicator,lp) // console.log(indicator,lp)
let res=[] let res=[]
......
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