# peck

> requires multiple modules

Latest version **4.0.1** (published 2022-07-01) · ISC license · 0 weekly downloads

## Install

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

## 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 | 4.0.1 |
| Published | 2022-07-01 |
| First published | 2015-09-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Daniel Bretoi |
| Maintainers | danielb |
| Keywords | require |

## Links

- npm: https://www.npmjs.com/package/peck
- Repository: https://github.com/danielb2/peck
- Homepage: https://github.com/danielb2/peck#readme
- Issues: https://github.com/danielb2/peck/issues
- npm.io page: https://npm.io/package/peck

## Dependencies (3)

- [joi](https://npm.io/package/joi.md) 17.x.x
- [camelcase](https://npm.io/package/camelcase.md) 6.x.x
- [inflection](https://npm.io/package/inflection.md) 1.x.x

## Recent versions

- 4.0.1 (latest) — 2022-07-01
- 4.0.0 — 2022-06-30
- 3.0.1 — 2019-06-06
- 3.0.0 — 2018-09-03
- 2.0.0 — 2018-07-11
- 1.0.4 — 2016-09-14
- 1.0.3 — 2015-09-22
- 1.0.2 — 2015-09-22
- 1.0.1 — 2015-09-22
- 1.0.0 — 2015-09-22

## README

## peck [![Build Status](https://travis-ci.org/danielb2/peck.svg?branch=master)](https://travis-ci.org/danielb2/peck)

Require multiple files in a directory

### Peck(dirname, [options])

Peck reads in a directory and transform all files into camelCase based on
filename rules using proper underscores. hello_world.js, and hello-world.js become helloWorld.

For a directory controllers containing a filename status.js among others:
``` javascript
var Controllers = Peck(__dirname + '/controllers');

hapiServer.route({
    path: '/generate-categories/status',
    method: 'GET',
    config: Controllers.status
});
```

note that if you have a structure such as `controllers/users/login.js` and
`controllers/users.js` which has a module.exports.logout function, the
respective objects will be merged to contain both a login and a logout function.
If the users.js has `modules.exports = []` the array will completely be ignored
since objects can't merge with arrays.


#### Options

Where options is an object with the following properties:

* `include` - Array or string of specific files to include. Optional
* `exclude` - Array or string of specific files to exclude. Optional

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