1.0.2 • Published 7 years ago

module-export v1.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

module-export

A module exporter for Node v4+

npm Version Travis CI Dependency Status Downloads License (MIT) XO Code Style

Contents

Usage

In Progress... Basic usage:

const moduleExport = require('module-export')(module);

moduleExport(() => { ... }); // Export a function

moduleExport({ ... }); // Export an object

class MyClass { ... }
moduleExport(MyClass); // Export a class

Testing

module-export uses xo (with slightly customized configuration) for linting, ava for unit testing, and nyc for coverage.

Test Scripts

  • npm run lint: Uses xo to lint the main source file, index.js.
  • npm run test-lint: Uses xo to lint the test source files, located in test/.
  • npm run unit: Executes test-lint and runs the ava unit tests using nyc for coverage.
  • npm report: Generates an HTML coverage report from nyc.
  • npm run test: Executes lint, unit and report in that order.

API

In Progress...