This is a simple utility for disallowing the use of "new" with certain functions. It's especially useful for when you have a capitalized factory function that you don't want people to use as a constructor (which would cause an unnecessary object allocation but otherwise succeed without warning).
Installation
npm install disallow-new
Usage
; { // [SNIP]} MyFactory;
Elsewhere:
let a = ; // Errors!
let a = ; // All good.