UNPKG
castelog
Version:
latest (0.0.1)
0.0.1
Programación JavaScript en castellano.
github.com/allnulled/castelog
allnulled/castelog
castelog
/
dev
/
increaseCounter.js
5 lines
(4 loc)
•
205 B
JavaScript
View Raw
1
2
3
4
5
const
fs =
require
(
"fs"
);
const
counter =
JSON
.
parse
(fs.
readFileSync
(__dirname +
"/counter.json"
,
"utf8"
)); counter.
count
++; fs.
writeFileSync
(__dirname +
"/counter.json"
,
JSON
.
stringify
(counter),
"utf8"
);