# @nhz.io/autoindex

> Autoindex directory (require) with custom loader

Latest version **1.0.0** (published 2016-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nhz.io/autoindex
pnpm add @nhz.io/autoindex
yarn add @nhz.io/autoindex
bun add @nhz.io/autoindex
```

## 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.0 |
| Published | 2016-09-17 |
| First published | 2016-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ishi Ruy |
| Maintainers | nhz.io |
| Keywords | autoindex, nhz.io |

## Links

- npm: https://www.npmjs.com/package/@nhz.io/autoindex
- Repository: https://github.com/nhz-io/autoindex
- Issues: https://github.com/nhz-io/autoindex/issues
- npm.io page: https://npm.io/package/@nhz.io/autoindex

## Dependencies (2)

- [glob](https://npm.io/package/glob.md) ^7.0.6
- [camelcase](https://npm.io/package/camelcase.md) ^3.0.0

## Recent versions

- 1.0.0 (latest) — 2016-09-17

## README

<h1 align="center">@nhz.io/autoindex</h1>

<p align="center">
  <a href="https://npmjs.org/package/@nhz.io/autoindex">
    <img src="https://img.shields.io/npm/v/@nhz.io/autoindex.svg?style=flat"
         alt="NPM Version">
  </a>

  <a href="https://www.bithound.io/github/nhz-io/autoindex">
    <img src="https://www.bithound.io/github/nhz-io/autoindex/badges/score.svg"
         alt="Bithound Status">
  </a>

  <a href="https://github.com/nhz-io/autoindex/blob/master/LICENSE">
    <img src="https://img.shields.io/github/license/nhz-io/autoindex.svg?style=flat"
         alt="License">
  </a>

  <a href="https://npmjs.org/package/@nhz.io/autoindex">
  <img src="http://img.shields.io/npm/dm/@nhz.io/autoindex.svg?style=flat"
  alt="Downloads">
  </a>  
</p>

<h3 align="center">Autoindex directory (require) with custom loader<h2>

## Install
```shell
npm i -S @nhz.io/autoindex
```

## Usage
```javascript
const ai = require('@nhz.io/autoindex')

module.exports = ai(__dirname, glob, loader)
...
```

## Example

```javascript
/** +-+
  *   +- index.js
  *   +- a.js
  *   +- b.js
  */

// File: index.js
const ai = require('@nhz.io/autoindex')

module.exports = ai(__dirname) // a.js and b.js are autorequired and exported
```

## Notes
* `glob` and `loader` are optional
* Default `glob` is: `*.+(js|json)`
* Default loader will skip `index.*` files
* Custom `loader` will receive the path of the matching module as a first argument

## License

### [MIT](LICENSE)

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