Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lffg-labs/lisdir
List a directory (lisdir) contents. Perhaps load its modules too?
https://github.com/lffg-labs/lisdir
Last synced: 12 days ago
JSON representation
List a directory (lisdir) contents. Perhaps load its modules too?
- Host: GitHub
- URL: https://github.com/lffg-labs/lisdir
- Owner: lffg-labs
- License: mit
- Created: 2019-10-05T20:34:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T22:11:18.000Z (almost 2 years ago)
- Last Synced: 2024-08-11T08:29:28.718Z (3 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/lisdir
- Size: 481 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `lisdir`
🔎 List a directory (lisdir). Perhaps load its modules too?
[![Build Status](https://circleci.com/gh/lffg/lisdir.svg?style=svg)](https://circleci.com/gh/lffg/lisdir)
[![NPM](https://img.shields.io/npm/v/lisdir.svg?logo=npm)](https://npmjs.org/package/lisdir)
![Uses TypeScript](https://img.shields.io/badge/Uses-Typescript-294E80.svg)## Installing
```shell
yarn add lisdir# If you're using NPM:
# npm install lisdir
```## Basic Usage
```ts
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](https://github.com/lffg) and [contributors](https://github.com/lffg/lisdir/graphs/contributors).
MIT License, see the included [MIT](https://github.com/lffg/lisdir/blob/master/LICENSE) file.