From 1f3019284389242c0c8e4e4d8c2bdc66473debf1 Mon Sep 17 00:00:00 2001 From: Rohan Deshpande Date: Sun, 15 May 2011 18:21:16 -0700 Subject: [PATCH] Adds support to use library in browser Check that "module" is defined before trying to set exports (only works in node.js) --- uris.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uris.js b/uris.js index 9cafc5f..7712aba 100644 --- a/uris.js +++ b/uris.js @@ -362,4 +362,5 @@ valueOf: function() { return this.value; } }; -module.exports = URI; \ No newline at end of file +if (typeof(module) != "undefined") + module.exports = URI;