# fabricator

> Discover collections of constructible instances from strings (filepaths), arrays or objects

Latest version **0.5.2** (published 2015-04-03) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2015-04-03 |
| First published | 2014-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Martijn Swaagman |
| Maintainers | swaagie, v1, 3rdeden |
| Keywords | Constructor, string, array, object, helper |

## Links

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

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.5.2 (latest) — 2015-04-03
- 0.5.1 — 2015-04-02
- 0.5.0 — 2015-03-27
- 0.4.4 — 2015-02-26
- 0.4.3 — 2014-12-24
- 0.4.2 — 2014-07-18
- 0.4.1 — 2014-07-14
- 0.4.0 — 2014-06-05
- 0.3.0 — 2014-06-05
- 0.2.1 — 2014-06-05
- 0.2.0 — 2014-05-30
- 0.1.0 — 2014-05-30
- 0.0.0 — 2014-05-28

## README

# Fabricator

[![Version npm][version]](http://browsenpm.org/package/fabricator)[![Build Status][build]](https://travis-ci.org/bigpipe/fabricator)[![Dependencies][david]](https://david-dm.org/bigpipe/fabricator)[![Coverage Status][cover]](https://coveralls.io/r/bigpipe/fabricator?branch=master)

[version]: http://img.shields.io/npm/v/fabricator.svg?style=flat-square
[build]: http://img.shields.io/travis/bigpipe/fabricator/master.svg?style=flat-square
[david]: https://img.shields.io/david/bigpipe/fabricator.svg?style=flat-square
[cover]: http://img.shields.io/coveralls/bigpipe/fabricator/master.svg?style=flat-square

Discover collections of constructible instances from strings (filepaths),
arrays or objects. Fabricator is a small helper module which does nothing
else but detecting constructible JS entities. Strings are resolved as filepaths.

The [BigPipe] project is using the fabricator to find Pages and/or Pagelets. This
gives developers using BigPipe more flexibility. For example, you don't have to
worry about adding each Page constructor to BigPipe, simply provide the directory
they reside in.

### Installation

```bash
npm install fabricator --save
```

### Usage

```js
var fabricator = require('fabricator')
  , path = './path/to/directory/with/constructibles';
  , obj = {
      status: require('./npm-status-pagelet'),
      extended: __dirname + '/i/can/be/a/path/to/a/constructor.js'
    }

//
// Discover constructors.
//
var stack = fabricator(obj);
```

### Tests

Make sure devDependencies are installed, after run the tests via:

```js
npm test
```

[BigPipe]: http://bigpipe.io/

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