Commit ab41ec5b authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 04525d8f
......@@ -24,6 +24,8 @@ async function init() {
}
arr=_.orderBy(arr,['date'])
createfileADV(JSON.stringify(arr))
for (let i=0;i<arr.length;i++)
{
......@@ -116,3 +118,13 @@ function get(date) {
}
function createfileADV(data) {
// console.log(data)
return new Promise(function (resolve, reject) {
fs.writeFile('worth.json', data, 'utf8', function (err) {
if (err) reject(err);
else resolve(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