modules-scan

1.0.1 • Public • Published

node-modules-scan

Build Status Dependency Status DevDependency Status Npm downloads Npm Version Git tag Github issues License

Utility library to search for Types/Classes/Subclasses in project folders.

Example

const requireType = require('modules-scan').byType
const BaseType = require(resolve('test/assets/base-info-contributor'))

// find all subclasses of base type and instantiate them
const contributors = requireType(".", BaseType, {excludeBaseType: true}).map(Constructor => new Constructor())

Installation

npm install modules-scan --save

Documentation

License

This project is distributed under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i modules-scan

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

18.4 kB

Total Files

21

Last publish

Collaborators

  • stfsy