diff --git a/lib/ghoul.js b/lib/ghoul.js index 2e0d9a6..d5563dd 100644 --- a/lib/ghoul.js +++ b/lib/ghoul.js @@ -1,18 +1,18 @@ !function(factory) { if (typeof exports === 'object') { - module.exports = factory(require('q')); + module.exports = factory(); } else if (typeof define === 'function' && define.amd) { - define(['q'], factory); + define(factory); } else { - ghoul = factory(Q); + ghoul = factory(); } -}(function(ghoul) { - ghoul.emit = function(name) { - var args = [].slice.apply(arguments) - , name = args.shift(); +}(function() { + return { + emit: function(name) { + var args = [].slice.apply(arguments) + , name = args.shift(); - console.log('ghoul.' + name, JSON.stringify(args)); + console.log('ghoul.' + name, JSON.stringify(args)); + } }; - - return ghoul; }); \ No newline at end of file