mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-23 20:44:42 +08:00
完善devtools
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
const nodeFns = {
|
||||
AbortController,
|
||||
AbortSignal,
|
||||
Array,
|
||||
ArrayBuffer,
|
||||
Boolean,
|
||||
Buffer,
|
||||
DataView,
|
||||
Date,
|
||||
Error,
|
||||
EvalError,
|
||||
Float32Array,
|
||||
Float64Array,
|
||||
Function,
|
||||
Int16Array,
|
||||
Int32Array,
|
||||
Int8Array,
|
||||
Intl,
|
||||
JSON,
|
||||
Math,
|
||||
Number,
|
||||
Object,
|
||||
RangeError,
|
||||
ReferenceError,
|
||||
RegExp,
|
||||
String,
|
||||
SyntaxError,
|
||||
TypeError,
|
||||
URIError,
|
||||
URL,
|
||||
URLSearchParams,
|
||||
Uint16Array,
|
||||
Uint32Array,
|
||||
Uint8Array,
|
||||
Uint8ClampedArray,
|
||||
atob,
|
||||
btoa,
|
||||
decodeURI,
|
||||
decodeURIComponent,
|
||||
encodeURI,
|
||||
encodeURIComponent,
|
||||
escape,
|
||||
isFinite,
|
||||
isNaN,
|
||||
parseFloat,
|
||||
parseInt,
|
||||
require,
|
||||
unescape,
|
||||
};
|
||||
|
||||
module.exports = nodeFns
|
@@ -1,7 +1,13 @@
|
||||
const nodeFns = require("./nodeFns")
|
||||
window._ = require("lodash")
|
||||
window.utools = require("./utoolsLite")()
|
||||
|
||||
Object.keys(nodeFns).forEach(key => {
|
||||
window[key] = nodeFns[key]
|
||||
})
|
||||
window.exit = () => {
|
||||
process.exit()
|
||||
}
|
||||
// 绕过限制
|
||||
setTimeout(() => {
|
||||
Object.assign(window, {
|
||||
process,
|
||||
Buffer,
|
||||
require
|
||||
})
|
||||
}, 100);
|
||||
|
Reference in New Issue
Block a user