Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fabricator

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fabricator

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

  • 0.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by23.08%
Maintainers
2
Weekly downloads
 
Created
Source

Fabricator Build Status NPM version Coverage 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

Package last updated on 18 Jul 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc