Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filelist-from

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filelist-from

Create a FileList from a path or a zip file

  • 0.2.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 03 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc