UNPKG
dotfile
Version:
latest (0.0.2)
0.0.2
0.0.1
0.0.0
easy way to read and write json dotfiles agnostic of the os
dotfile
/
readme.md
16 lines
(13 loc)
•
278 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# dotfile simple way to save
and
read
dotfiles ``` js var dotfile =
require
(
'dotfile'
)(
'foo'
); dotfile.exists(
function
(yesno)
{ dotfile.
write
({a:
1
},
function
(err)
{ dotfiles.
read
(
function
(err, disk)
{ console.
log
(disk); }); }); }); // outputs {a:
1
} ```