# iterable-readfiles

> Node.js module for iterate through all files in a directory.

Latest version **1.0.5** (published 2018-03-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install iterable-readfiles
pnpm add iterable-readfiles
yarn add iterable-readfiles
bun add iterable-readfiles
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2018-03-02 |
| First published | 2018-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 2 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | fengjie |
| Maintainers | niklaus0823 |

## Links

- npm: https://www.npmjs.com/package/iterable-readfiles
- Repository: https://github.com/niklaus0823/node-iterable-readfiles
- Homepage: https://github.com/niklaus0823/node-iterable-readfiles#readme
- Issues: https://github.com/niklaus0823/node-iterable-readfiles/issues
- npm.io page: https://npm.io/package/iterable-readfiles

## Dependencies (2)

- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4

## Recent versions

- 1.0.5 (latest) — 2018-03-02
- 1.0.4 — 2018-03-02
- 1.0.3 — 2018-03-02
- 1.0.2 — 2018-03-02
- 1.0.1 — 2018-03-02
- 1.0.0 — 2018-03-02

## README

iterable-readfiles
=========================
Node.js module for iterate through all files in a directory.

## Install

```bash
npm install iterable-readfiles --save
```

## How to use

```typescript
import {readfiles, IgnoreType, IgnoreFunction} from 'iterable-readfiles';

// Customize your ignore rule set
let customize: IgnoreFunction = (path: string): boolean => {
    // ignore file：/data1/www/readfiles/package.json
    let shallIgnore = false;
    if (path.indexOf(LibPath.normalize('/data1/www/readfiles/package.json')) !== -1) {
        shallIgnore = true;
    }
    return shallIgnore;
};
// ignore dirname:`node_modules` , regular expression:`*.js`, IgnoreFunction: customize()
let ignores:  Array<IgnoreType> = ['node_modules', '*.js', customize];

readfiles('some/path', ignores)
    .then(files => console.log(files))
    .catch(err => console.log(err));
```

---
_Source: https://npm.io/package/iterable-readfiles · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
