Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
ai
Commits
a9c5a23c
Commit
a9c5a23c
authored
Jul 15, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pull
parent
f5f12663
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
mint.js
mint.js
+33
-0
No files found.
mint.js
0 → 100644
View file @
a9c5a23c
const
fs
=
require
(
'
fs
'
)
const
_
=
require
(
'
lodash
'
)
reader
()
async
function
reader
()
{
let
files
=
await
fs
.
readdirSync
(
'
torob
'
)
files
=
_
.
reverse
(
files
)
if
(
files
.
length
<
2
)
return
let
file1
=
await
fs
.
readFileSync
(
'
./torob/
'
+
files
[
0
],
'
utf8
'
)
file1
=
JSON
.
parse
(
file1
)
let
file2
=
await
fs
.
readFileSync
(
'
./torob/
'
+
files
[
1
],
'
utf8
'
)
file2
=
JSON
.
parse
(
file2
)
let
arr
=
[]
for
(
let
i
=
0
;
i
<
file1
.
length
;
i
++
)
arr
.
push
(
file1
[
i
])
for
(
let
i
=
0
;
i
<
file2
.
length
;
i
++
)
arr
.
push
(
file2
[
i
])
createfileADV
(
JSON
.
stringify
(
arr
,
null
,
2
))
}
function
createfileADV
(
data
)
{
// console.log(data)
return
new
Promise
(
function
(
resolve
,
reject
)
{
fs
.
writeFile
(
'
t.json
'
,
data
,
'
utf8
'
,
function
(
err
)
{
if
(
err
)
reject
(
err
);
else
resolve
(
data
);
});
});
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment