first commit
This commit is contained in:
29
build/node_modules/prepack/lib/intrinsics/common/console.js
generated
vendored
Normal file
29
build/node_modules/prepack/lib/intrinsics/common/console.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (realm) {
|
||||
var obj = new _index.ObjectValue(realm, realm.intrinsics.ObjectPrototype, "console");
|
||||
|
||||
obj.defineNativeMethod("log", 0, function (context, args) {
|
||||
realm.outputToConsole("log", args);
|
||||
return realm.intrinsics.undefined;
|
||||
});
|
||||
|
||||
obj.defineNativeMethod("error", 0, function (context, args) {
|
||||
realm.outputToConsole("error", args);
|
||||
return realm.intrinsics.undefined;
|
||||
});
|
||||
|
||||
obj.defineNativeMethod("warn", 0, function (context, args) {
|
||||
realm.outputToConsole("warn", args);
|
||||
return realm.intrinsics.undefined;
|
||||
});
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
var _index = require("../../values/index.js");
|
||||
//# sourceMappingURL=console.js.map
|
||||
Reference in New Issue
Block a user