From 8efd7757e9888ed422a40f9a71147a4657dd0b7e Mon Sep 17 00:00:00 2001 From: Jordan Sexton Date: Fri, 26 Jun 2015 17:21:43 -0500 Subject: [PATCH] Allow constructor to be called as a function --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 5a71ccc..b160e39 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,10 @@ var Revisioner = require('./revisioner'); var RevAll = (function () { var RevAll = function (options) { + + if (!(this instanceof RevAll)) { + return new RevAll(options); + } this.revisioner = new Revisioner(options);