O'Reilly logo
  • Dilip Kushwaha thinks this is interesting:

function Logger(name) { if(!new.target) { return new LoggerConstructor(name); } this.name = name; }

From

Cover of Node.js Design Patterns - Second Edition

Note

ES2015 factory pattern