# reqdirp

> Recursively requires files in a specified directory

Latest version **1.0.3** (published 2015-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install reqdirp
pnpm add reqdirp
yarn add reqdirp
bun add reqdirp
```

## 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.3 |
| Published | 2015-02-12 |
| First published | 2015-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Josiah Savary |
| Maintainers | josiahsavary |

## Links

- npm: https://www.npmjs.com/package/reqdirp
- Repository: https://github.com/josiahsavary/reqdirp
- Issues: https://github.com/josiahsavary/reqdirp/issues
- npm.io page: https://npm.io/package/reqdirp

## Recent versions

- 1.0.3 (latest) — 2015-02-12
- 1.0.2 — 2015-02-12
- 1.0.1 — 2015-02-12
- 1.0.0 — 2015-02-12

## README

# reqdirp

Recursively requires files in a specified directory

## API

### reqdirp(dir [,exts, exports])

Returns and object containing all module.exports from .js/.json files within a directory and its subdirectories

```js
var reqdirp = require('reqdirp')
  , modules = reqdirp('./path/to/some/directory')
  
// `modules` will now be an object containing all exports from every .js and .json file
// reqdirp excludes index.js, package.json, and node_modules
  
```

#### dir

Type: `String`

Path of directory to be required. If not absolute, will be relative to `process.cwd()`

#### exts

Type: `Array` Default: `['.js','.json']`

A list of files to require()

#### exports

Type: `Object` Default: `{}`

An object to assign all module.exports to

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