0.3.0 • Published 2 years ago

filelist-from v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

filelist-from

NPM version build status Test coverage npm download

Create a FileList from a path or a zip.

In order to make compatible code between the browser and node and to allow drag and drop of a folder it is useful to deal with FileList (that implements an Iterator of File).

This library allows to create such a FileList from a directory path (only available in nodejs) or from a zip file (available from nodejs and the browser).

Installation

npm i filelist-from

Usage

import { fileListFromPath } from 'filelist-from';

const fileList = fileListFromPath(join(__dirname));
import { fileListFromZip } from 'filelist-from';

const zip = readFileSync(join(__dirname, 'test.zip'));
const fileList = fileListFromZip(zip);

License

MIT

0.3.0

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago