From efff2f0610590ec90104fd192cca981c37cb93a4 Mon Sep 17 00:00:00 2001 From: deltreey Date: Mon, 3 Aug 2015 23:43:02 -0400 Subject: [PATCH] bugfix wrap in an anonymous function to limit globals in the namespace module.exports to make node work --- .jshintrc | 1 - index.js | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.jshintrc b/.jshintrc index efa28d6..1ff65e8 100644 --- a/.jshintrc +++ b/.jshintrc @@ -11,6 +11,5 @@ "node": true, "sub": true, "undef": true, - "unused": true, "esnext": true } diff --git a/index.js b/index.js index 0c58892..5fba4ec 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,8 @@ 'use strict'; -var wildstring = { +var wildstring = (function(module) { + +wildstring = { wildcard: '*', caseSensitive: true }; @@ -144,4 +146,6 @@ wildstring.replace = function (pattern, strings) { return result; }; -if (module) { module.exports = wildstring; } +module.exports = wildstring; +return wildstring; +}(module || {}));