From 61fdd20c7041f6d0515f48161f6bc9cf7be87ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fouilhe=CC=81?= Date: Mon, 8 Feb 2016 11:09:25 +0100 Subject: [PATCH] Expose Emitter if module exists --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 1c78176..fa4faee 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,9 @@ * Expose `Emitter`. */ -module.exports = Emitter; +if (typeof module !== 'undefined') { + module.exports = Emitter; +} /** * Initialize a new `Emitter`.