# bulk-export

> Requires files in a directory and returns the results as a keyed object

Latest version **1.0.1** (published 2014-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install bulk-export
pnpm add bulk-export
yarn add bulk-export
bun add bulk-export
```

## 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.1 |
| Published | 2014-09-18 |
| First published | 2014-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maurice Butler |
| Maintainers | mauricebutler |

## Links

- npm: https://www.npmjs.com/package/bulk-export
- Repository: https://github.com/MauriceButler/bulk-export
- Issues: https://github.com/MauriceButler/bulk-export/issues
- npm.io page: https://npm.io/package/bulk-export

## Recent versions

- 1.0.1 (latest) — 2014-09-18
- 1.0.0 — 2014-09-17

## README

# bulk-export

Requires files in a directory and returns the results as a keyed object

This was kinda of an experiment in removing boilerplate stuff I was typing over and over again when exposing a "namespace" module

Automagically load sub files and export them thus removing the painful touch index file every time you add something dance...


### Update

This turned out to be just a bit too magic so I don't actually use it...


## Usage

With a structure such as:

    services
        |__ foo.js
        |__ bar.js
        |__ index.js

You would normaly have code like this in `index.js`

    module.exports = {
        foo: require('./foo'),
        bar: require('./bar')
    }

So that somewhere else you could just require services and get an object like this:

    {
        foo: 'contents of foo',
        bar: 'contents of bar'
    }

with this module the contents of `index.js` is just

    module.exports = require('bulk-export');

and you would get the same result


## Issues

1. This is waaaaaay too magical and unless you know what this module does you can not work it out by reading the code.
2. Only works once, this was an experiment so I haven't bothered to make it a function to break the require cache stuff.
3. It will probably do crazy stuff with async load and require cache if I was to actually do it as above.

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