UNPKG
@forabi/memfs
Version:
latest (2.7.2)
2.7.2
In-memory file-system with Node's fs API.
github.com/streamich/memfs
streamich/memfs
@forabi/memfs
/
demo
/
localstorage.ts
15 lines
(8 loc)
•
268 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
{createVolume}
from
'../src/volume-localstorage'
;
const
obj = {};
const
Volume
=
createVolume
(
'default'
, obj);
const
vol =
new
Volume
; vol.
fromJSON
({
'/foo'
:
'bar'
,
'/foo2'
:
'bar2'
});
// vol.unlinkSync('/foo');
console
.
log
(obj);
console
.
log
(vol.
toJSON
());