fix(util) change the way of detection node.js

This commit is contained in:
coderaiser 2014-03-23 16:47:22 +02:00
parent f68b982c82
commit f248207dfe

View file

@ -6,15 +6,12 @@
(function(scope) {
'use strict';
var Scope;
var Scope = scope.window ? window : global;
if (scope.window) {
Scope = window;
Scope.Util = new UtilProto();
} else {
Scope = global;
module.exports = new UtilProto();
}
if (typeof module === 'object' && module.exports)
module.exports = new UtilProto();
else
Scope.Util = new UtilProto();
function UtilProto() {
var Util = this;