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
|
||||
1
build/node_modules/prepack/lib/intrinsics/common/console.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/intrinsics/common/console.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/intrinsics/common/console.js"],"names":["realm","obj","intrinsics","ObjectPrototype","defineNativeMethod","context","args","outputToConsole","undefined"],"mappings":";;;;;;kBAce,UAASA,KAAT,EAAoC;AACjD,MAAIC,MAAM,uBAAgBD,KAAhB,EAAuBA,MAAME,UAAN,CAAiBC,eAAxC,EAAyD,SAAzD,CAAV;;AAEAF,MAAIG,kBAAJ,CAAuB,KAAvB,EAA8B,CAA9B,EAAiC,UAACC,OAAD,EAAUC,IAAV,EAAmB;AAClDN,UAAMO,eAAN,CAAsB,KAAtB,EAA6BD,IAA7B;AACA,WAAON,MAAME,UAAN,CAAiBM,SAAxB;AACD,GAHD;;AAKAP,MAAIG,kBAAJ,CAAuB,OAAvB,EAAgC,CAAhC,EAAmC,UAACC,OAAD,EAAUC,IAAV,EAAmB;AACpDN,UAAMO,eAAN,CAAsB,OAAtB,EAA+BD,IAA/B;AACA,WAAON,MAAME,UAAN,CAAiBM,SAAxB;AACD,GAHD;;AAKAP,MAAIG,kBAAJ,CAAuB,MAAvB,EAA+B,CAA/B,EAAkC,UAACC,OAAD,EAAUC,IAAV,EAAmB;AACnDN,UAAMO,eAAN,CAAsB,MAAtB,EAA8BD,IAA9B;AACA,WAAON,MAAME,UAAN,CAAiBM,SAAxB;AACD,GAHD;;AAKA,SAAOP,GAAP;AACD,C;;AArBD","file":"console.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { Realm } from \"../../realm.js\";\nimport { ObjectValue } from \"../../values/index.js\";\n\nexport default function(realm: Realm): ObjectValue {\n let obj = new ObjectValue(realm, realm.intrinsics.ObjectPrototype, \"console\");\n\n obj.defineNativeMethod(\"log\", 0, (context, args) => {\n realm.outputToConsole(\"log\", args);\n return realm.intrinsics.undefined;\n });\n\n obj.defineNativeMethod(\"error\", 0, (context, args) => {\n realm.outputToConsole(\"error\", args);\n return realm.intrinsics.undefined;\n });\n\n obj.defineNativeMethod(\"warn\", 0, (context, args) => {\n realm.outputToConsole(\"warn\", args);\n return realm.intrinsics.undefined;\n });\n\n return obj;\n}\n"]}
|
||||
Reference in New Issue
Block a user