Current Folder

This commit is contained in:
Luis Fernando Molina committed 2020-11-20 14:05:59 +01:00
1 parent 8b3382289b
commit cfcada880d
4379 files changed

No files matched your search

-53
View File
@@ -1,53 +0,0 @@
// shim for using process in browser
var process = module.exports = {};
process.nextTick = (function () {
var canSetImmediate = typeof window !== 'undefined'
&& window.setImmediate;
var canPost = typeof window !== 'undefined'
&& window.postMessage && window.addEventListener
;
if (canSetImmediate) {
return function (f) { return window.setImmediate(f) };
}
if (canPost) {
var queue = [];
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 = [];
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
View File
@@ -1,2 +0,0 @@
// for now just expose the builtin process global from node.js
module.exports = global.process;
-22
View File
@@ -1,22 +0,0 @@
{
"author": "Roman Shtylman <shtylman@gmail.com>",
"name": "process",
"description": "process information for node.js and browsers",
"keywords": [
"process"
],
"version": "0.5.2",
"repository": {
"type": "git",
"url": "git://github.com/shtylman/node-process.git"
},
"browser": "./browser.js",
"main": "./index.js",
"engines": {
"node": ">= 0.6.0"
}
,"_resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz"
,"_integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8="
,"_from": "process@~0.5.1"
}