UNPKG

@forabi/memfs

Version:

In-memory file-system with Node's fs API.

12 lines (8 loc) 268 B
import {createFsFromVolume, Volume} from '..'; export const create = (json: {[s: string]: string} = {'/foo': 'bar'}) => { const vol = Volume.fromJSON(json); return vol; }; export const createFs = (json?) => { return createFsFromVolume(create(json)); };