Socket
Socket
Sign inDemoInstall

fabricator

Package Overview
Dependencies
0
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fabricator

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


Version published
Weekly downloads
13
increased by44.44%
Maintainers
3
Install size
17.1 kB
Created
Weekly downloads
 

Readme

Source

Fabricator

Version npmBuild StatusDependenciesCoverage Status

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

npm install fabricator --save

Usage

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:

npm test

Keywords

FAQs

Last updated on 03 Apr 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc