Commit 58026d48 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 73ea39ee
node uniq.js
\ No newline at end of file
let fs = require('fs')
let _=require('lodash')
run()
async function run() {
let configs = await fs.readdirSync('uniq/')
let arr=[]
for (let i = 0; i < configs.length; i++) {
if (!configs[i].includes('.json'))
continue
let config= await fs.readFileSync('./uniq/'+configs[i], 'utf8')
config=JSON.parse(config)
for (let j=0;j<config.length;j++)
arr.push(config[j])
}
// console.log(arr)
arr=_.uniqBy(arr, 'platform');
console.log('All Uniq Platform:'+arr.length)
}
function createfileADV(data) {
// console.log(data)
return new Promise(function (resolve, reject) {
fs.writeFile('configs/last.json', data, 'utf8', function (err) {
if (err) reject(err);
else resolve(data);
});
});
}
\ No newline at end of file
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