diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb6047c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ + +node_modules +npm-debug.log diff --git a/underscore.nest.js b/underscore.nest.js index adccbdb..d356f87 100644 --- a/underscore.nest.js +++ b/underscore.nest.js @@ -4,7 +4,16 @@ * Copyright (c) 2012 Irene Ros; * Underscore.Nest is freely distributable under the MIT license. */ -(function(global, _) { +(function(global) { + + var _ = global._; + + if(_ === undefined) { + if (typeof require !== 'undefined') { + _ = require('underscore'); + } + } + var nester = global.nest = {}; @@ -100,4 +109,5 @@ global._.mixin(nester); } -}(this, _)); \ No newline at end of file +}(this)); +