1.0.1 • Published 3 years ago

modules-scan v1.0.1

Weekly downloads
78
License
MIT
Repository
github
Last release
3 years ago

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.