Teaser image of Hey There Module

Hey There Module

  • JS

A node JS library to manage exports more expressively to make them easier to test.


After getting into functional programming I found myself having a hard time working with node’s exports. When exporting pure functions it is difficult to mock side-effects compared to OOP classes which allow overriding a method or property. I wanted a way to manage exports more simply and make it easy to stub them out for unit tests.


  1. Started by writing out ideal interface code instead of implementation
  2. Ran it by coworkers to collect feedback on syntax and if the project is a good idea
  3. Implemented the library in node.js using now native ES2015 features
  4. Wrote unit tests


  • Learned the internals of node’s require system
  • Gained experience working with pure functions
  • Gained better understanding of trade-offs focusing on functional-programming in node.