Created
October 23, 2014 09:38
-
-
Save yurynix/ab192ffb016308f47ce6 to your computer and use it in GitHub Desktop.
diff --git a/main_good.js b/main_bad.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main_good.js b/main_bad.js | |
index 22979ef..9521811 100644 | |
--- a/main_good.js | |
+++ b/main_bad.js | |
@@ -1054,124 +1054,4 @@ function hasOwnProperty(obj, prop) { | |
} | |
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
-},{"./support/isBuffer":4,"_process":3,"inherits":2}],4:[function(require,module,exports){ | |
-module.exports = function isBuffer(arg) { | |
- return arg && typeof arg === 'object' | |
- && typeof arg.copy === 'function' | |
- && typeof arg.fill === 'function' | |
- && typeof arg.readUInt8 === 'function'; | |
-} | |
-},{}],3:[function(require,module,exports){ | |
-// shim for using process in browser | |
- | |
-var process = module.exports = {}; | |
- | |
-process.nextTick = (function () { | |
- var canSetImmediate = typeof window !== 'undefined' | |
- && window.setImmediate; | |
- var canMutationObserver = typeof window !== 'undefined' | |
- && window.MutationObserver; | |
- var canPost = typeof window !== 'undefined' | |
- && window.postMessage && window.addEventListener | |
- ; | |
- | |
- if (canSetImmediate) { | |
- return function (f) { return window.setImmediate(f) }; | |
- } | |
- | |
- var queue = []; | |
- | |
- if (canMutationObserver) { | |
- var hiddenDiv = document.createElement("div"); | |
- var observer = new MutationObserver(function () { | |
- var queueList = queue.slice(); | |
- queue.length = 0; | |
- queueList.forEach(function (fn) { | |
- fn(); | |
- }); | |
- }); | |
- | |
- observer.observe(hiddenDiv, { attributes: true }); | |
- | |
- return function nextTick(fn) { | |
- if (!queue.length) { | |
- hiddenDiv.setAttribute('yes', 'no'); | |
- } | |
- queue.push(fn); | |
- }; | |
- } | |
- | |
- if (canPost) { | |
- window.addEventListener('message', function (ev) { | |
- var source = ev.source; | |
- if ((source === window || source === null) && ev.data === 'process-tick') { | |
- ev.stopPropagation(); | |
- if (queue.length > 0) { | |
- var fn = queue.shift(); | |
- fn(); | |
- } | |
- } | |
- }, true); | |
- | |
- return function nextTick(fn) { | |
- queue.push(fn); | |
- window.postMessage('process-tick', '*'); | |
- }; | |
- } | |
- | |
- return function nextTick(fn) { | |
- setTimeout(fn, 0); | |
- }; | |
-})(); | |
- | |
-process.title = 'browser'; | |
-process.browser = true; | |
-process.env = {}; | |
-process.argv = []; | |
- | |
-function noop() {} | |
- | |
-process.on = noop; | |
-process.addListener = noop; | |
-process.once = noop; | |
-process.off = noop; | |
-process.removeListener = noop; | |
-process.removeAllListeners = noop; | |
-process.emit = noop; | |
- | |
-process.binding = function (name) { | |
- throw new Error('process.binding is not supported'); | |
-}; | |
- | |
-// TODO(shtylman) | |
-process.cwd = function () { return '/' }; | |
-process.chdir = function (dir) { | |
- throw new Error('process.chdir is not supported'); | |
-}; | |
- | |
-},{}],2:[function(require,module,exports){ | |
-if (typeof Object.create === 'function') { | |
- // implementation from standard node.js 'util' module | |
- module.exports = function inherits(ctor, superCtor) { | |
- ctor.super_ = superCtor | |
- ctor.prototype = Object.create(superCtor.prototype, { | |
- constructor: { | |
- value: ctor, | |
- enumerable: false, | |
- writable: true, | |
- configurable: true | |
- } | |
- }); | |
- }; | |
-} else { | |
- // old school shim for old browsers | |
- module.exports = function inherits(ctor, superCtor) { | |
- ctor.super_ = superCtor | |
- var TempCtor = function () {} | |
- TempCtor.prototype = superCtor.prototype | |
- ctor.prototype = new TempCtor() | |
- ctor.prototype.constructor = ctor | |
- } | |
-} | |
- | |
-},{}]},{},[1]); | |
+},{"./support/isBuffer":4,"_process":3,"inherits":2}] | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment