Skip to content

List a directory (lisdir) contents. Perhaps load its modules too?

License

Notifications You must be signed in to change notification settings

lffg-labs/lisdir

Repository files navigation

lisdir

🔎 List a directory (lisdir). Perhaps load its modules too?

Build Status NPM Uses TypeScript

Installing

yarn add lisdir

# If you're using NPM:
# npm install lisdir

Basic Usage

import { listDirectory, listModules } from 'lisdir';

const entries = await listDirectory('./some/directory', {
  filter: (entry) => file.isFile(),
  recursive: true
});

const modules = await listModules('./some/directory', {
  filter: (entry) => entry.name.startsWith('foo'),
  recursive: true,
  extensions: ['js']
});

Authors and License

lffg and contributors.

MIT License, see the included MIT file.